Skip to content

Instantly share code, notes, and snippets.

@nulpatrol
Last active February 21, 2017 11:25
Show Gist options
  • Save nulpatrol/ff64ffa033a0bf91ec10da0af1bee44b to your computer and use it in GitHub Desktop.
Save nulpatrol/ff64ffa033a0bf91ec10da0af1bee44b to your computer and use it in GitHub Desktop.
Git CheatSheet
"git checkout ." - delete local changes
"git config --global credential.helper wincred" - save credentials
git checkout --ours .
git checkout --theirs .
To remove untracked files / directories do:
git clean -fdx
-f - force
-d - directories too
-x - remove ignored files too ( don't use this if you don't want to remove ignored files)
git tag -a v1.4 -m "my version 1.4"
git push origin v1.5
git diff tag1 tag2
git log tag1..tag2
git diff tag1 tag2 --stat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment