Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Local Remote Branch Cleanup
- git fetch --prune
- git checkout -b <branch> <commit>
- # Reset to <commit>, keeping modified files in staging area
- git reset --soft <commit>
- # Undoing local changes, removal from staging area
- git rm --cached <file>
- git reset HEAD <file>
- git reset <file>
- # Reset staging area and working directory
- git reset --hard
- git reset <commit>
- git reset HEAD~2
- git clean [-n] # n == dry
- git log -n <limit>
- git log --oneline
- # p == patch
- git log -p
- git log --grep="<pattern>"
- git log <file>
- git log --graph --decorate --oneline
- git checkout <commit> <file>
- git checkout <commit>
- git checkout HEAD
- git checkout HEAD <file>
- # undo one commit (creates an undo patch of <commit>, applies the patch)
- git revert <commit>
- # i == interactive
- git rebase [-i] <branch>
- # check which ignore rule matches
- git check-ignore -v *
- # list tags
- git tag
- # rm tag
- git tag -d <tag>
- git push origin :refs/tags/<tag>
Advertisement
Add Comment
Please, Sign In to add comment