Changes between Version 2 and Version 3 of Csle2022/Agenda/githubadministration


Ignore:
Timestamp:
Nov 12, 2022, 8:49:12 PM (2 years ago)
Author:
deepthi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Csle2022/Agenda/githubadministration

    v2 v3  
    4646=== Add a new file to the repo ===
    4747
     48==== From web UI ====
     49
    48501.On GitHub.com, navigate to the main page of the repository.
    4951
    50522.Above the list of files, using the Add file drop-down, click Upload files.
    5153
    52 [[Image(https://ws.learn.ac.lk/attachment/wiki/Csle2022/Agenda/githubadministration/upload-files-button.png, 600)]]
     54[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/upload-files-button.png, 600)]]
    5355
    54563.Drag and drop the file or folder you'd like to upload to your repository onto the file tree.
    5557
    56 [[Image(https://ws.learn.ac.lk/attachment/wiki/Csle2022/Agenda/githubadministration/upload-files-drag-and-drop.png, 600)]]
     58[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/upload-files-drag-and-drop.png, 600)]]
    5759
    58604.At the bottom of the page, type a short, meaningful commit message that describes the change you made to the file. You can attribute the commit to more than one author in the commit message.
    5961
    60 [[Image(https://ws.learn.ac.lk/attachment/wiki/Csle2022/Agenda/githubadministration/write-commit-message-quick-pull.png, 600)]]
     62[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/write-commit-message-quick-pull.png, 600)]]
    6163
    62645.Below the commit message fields, decide whether to add your commit to the current branch or to a new branch. If your current branch is the default branch, you should choose to create a new branch for your commit and then create a pull request.
    6365
    64 [[Image(https://ws.learn.ac.lk/attachment/wiki/Csle2022/Agenda/githubadministration/choose-commit-branch.png, 600)]]
     66[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/choose-commit-branch.png, 600)]]
    6567
    66686.Click Commit changes.
    6769
    68 [[Image(https://ws.learn.ac.lk/attachment/wiki/Csle2022/Agenda/githubadministration/commit-changes-button.png, 600)]]
     70[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/commit-changes-button.png, 600)]]
     71
     72==== From the terminal ====
     73
     741.On your computer, move the file you'd like to upload to GitHub into the local directory that was created when you cloned the repository.
     75
     762.Open Terminal.
     77
     783.Change the current working directory to your local repository.
     79
     804.Stage the file for commit to your local repository.
     81
     82{{{
     83$ git add .
     84# Adds the file to your local repository and stages it for commit. To unstage a file, use 'git reset HEAD YOUR-FILE'.
     85}}}
     86
     875.Commit the file that you've staged in your local repository.
     88
     89{{{
     90$ git commit -m "Add existing file"
     91# Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.
     92}}}
     93
     946.Push the changes in your local repository to GitHub.com.
     95
     96{{{
     97$ git push origin YOUR_BRANCH
     98# Pushes the changes in your local repository up to the remote repository you specified as the origin
     99}}}
    69100
    70101=== Add a file to the staging environment ===
    71102
     103The "add" command marks changes to be included in the next commit.
     104
     105It adds changes to Git's "Staging Area", the contents of which can then be wrapped up in a new revision with the "git commit" command.
     106
     107You can provide one or multiple paths and thereby add changes in these files to the Staging Area:
     108
     109`git add file1 file2`
     110
     111These changes will then be part of the next commit.
     112
     113In case you want all current modifications in your project to be added to the Staging Area (including deletions and new files), you can simply use "--all" or "-A":
     114
     115`git add --all`
     116
    72117=== Create a commit ===
     118
     119Commits are the building blocks of "save points" within Git's version control.
     120
     121`git commit -m "update the README.md"`
     122
    73123=== Create a branch ===
    74 === Create a new repo on Github ===
     124
     125==== From web GUI ====
     126
     1271.On GitHub.com, navigate to the main page of the repository.
     128
     1292.Above the list of files, click  Branches.
     130
     131[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/branches-overview-link-2.png, 600)]]
     132
     1333.Click New branch.
     134
     135[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/new-branch-button.png, 600)]]
     136
     1374.In the dialog box, enter the branch name and optionally change the branch source.
     138If the repository is a fork, you also have the option to select the upstream repository as the branch source.
     139
     140[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/branch-creation-popup-branch-source.png, 600)]]
     141
     1425.Click Create branch.
     143
     144[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/branch-creation-popup-button.png, 600)]]
     145
     146==== Creating a branch using the branch dropdown ====
     147
     1481.On GitHub.com, navigate to the main page of the repository.
     149
     1502. Optionally, if you want to create the new branch from a branch other than the default branch of the repository, click  Branches then choose another branch.
     151
     152[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/branches-overview-link-3.png, 600)]]
     153
     1543.Click the branch selector menu.
     155
     156[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/branch-selection-dropdown.png, 600)]]
     157
     1584.Type a unique name for your new branch, then select Create branch.
     159
     160[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/Csle2022/Agenda/githubadministration/branch-creation-text-box.png, 600)]]
     161
    75162=== Push a branch to GitHub ===
    76163=== Create a pull request ===