Changes between Version 1 and Version 2 of SourceCodeGit/Commands
- Timestamp:
- Aug 17, 2017, 6:49:45 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SourceCodeGit/Commands
v1 v2 3 3 Writing this page I lean heavily on the commands used at [https://www.siteground.com/tutorials/git/commands.htm Siteground.com] and some on [https://confluence.atlassian.com/bitbucket/branching-a-repository-223217999.html Confluence]. 4 4 5 We're not trying to teach a user how to use Git, but instead if they're ever stuck they can come to the page and quickly look down the page for the command they're missing. 5 We're not trying to teach a user how to use Git, but instead if they're ever stuck they can come to the page and quickly look down the page for the command they're missing. 6 7 '''Note:''' Git is context sensitive. All commands by default operate on the current active branch if no specific branch is specified! Before copy&pasting a command please make sure you have the correct branch activated. 6 8 7 9 ---- … … 9 11 git clone https://github.com/BOINC/boinc boinc 10 12 }}} 11 With this command you make a complete copy of the remote BOINC repository from the server onto your computer .13 With this command you make a complete copy of the remote BOINC repository from the server onto your computer into the newly created directory "boinc". 12 14 13 15 {{{ 14 16 git fetch 15 17 }}} 16 With this command you get all the objects from the remote repository that are not present in the local one.18 With this command you get all the objects (commits, branches) from the remote repository that are not present in the local one but nothing get's merged. 17 19 18 20 {{{ 19 21 git pull 20 22 }}} 21 With this command you get all the changed files from the remote repository and merge them with your local one.23 With this command you get all the objects from the remote repository (''git fetch'') and merge changes from the remote branch into your currently active local branch (''git merge''). 22 24 23 25 {{{ 24 git branch boinc_7.826 git checkout client_release/7/7.8 25 27 }}} 26 With this command you make a branch called boinc_7.8 in your local repository.28 With this command you create and activate a local copy of the remote client release branch. 27 29 28 30 {{{ 29 git branch --set-upstream-to=origin/client_release/7/7.831 git checkout --track -b boinc_7.8 origin/client_release/7/7.8 30 32 }}} 31 It may happen at times that you've cloned the BOINC repository and that it then only remembers the path to the remote repository's Master branch, which makes it impossible for you to update the boinc_7.8 branch with. With the above command you can quickly set the boinc_7.8 branch to the right remote repository. Git on your system will remember both paths after this.33 With this command you create and activate a local copy of the remote client release branch with a custom name. The local branch is also connected to the remote branch so that ''git pull'' still works. 32 34 33 35 {{{ 34 36 git checkout boinc_7.8 35 37 }}} 36 With this command you can switch to the boinc_7.8 branch from the Master branch.38 With this command you can switch to your custom branch if you switched to a different branch in the meantime. 37 39 38 40 {{{ 39 41 git checkout master 40 42 }}} 41 With this command you can switch to the Master branch from the boinc_7.8 branch.43 With this command you can switch to the Master branch if you switched to a different branch in the meantime. 42 44 43 45 {{{