Last active
December 10, 2015 23:38
-
-
Save wtarr/4510579 to your computer and use it in GitHub Desktop.
Git commands
This file contains 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
#add a file | |
git add Transform.cs | |
#show list of branches | |
git branch | |
#create a branch | |
git branch mynewbranch | |
#switch to that branch | |
git checkout mynewbranch | |
#commit a change | |
git commit -a -m "comment for changes made" | |
#undo pending changes | |
git stash save --keep-index | |
git stash drop | |
#delete unversioned files | |
git clean -df | |
#check out an old state | |
git check -b previousstate 45frfef...ect | |
#resolve a binary conflict | |
git checkout --ours -- path/to/file | |
#or | |
git checkout --theirs -- path/to/file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment