Last active
October 13, 2015 22:28
-
-
Save NimbusBP1729/4265379 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getting an up-to-date upstream: | |
git checkout master | |
git pull upstream master | |
git push origin master | |
making a new branch called 'new_branch_name': | |
git checkout master | |
git checkout -b new_branch_name | |
switching to an existing branch called 'some_branch_name': | |
git checkout some_branch_name | |
staging changes to a new branch: | |
>> to stage removal of a file named foo.txt: | |
git rm foo.txt | |
>> to stage addition of a file named foo.txt: | |
git add foo.txt | |
>> to stage addition of all new files: | |
git add . | |
to commit staged changes to a branch: | |
git commit -m "a helpful message" | |
getting an up-to-date branch: | |
git fetch <remote> | |
git checkout <remote>/<branch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment