Created
October 19, 2020 17:48
-
-
Save safhac/686fefc82a397d4ef8d46de3bf9110a8 to your computer and use it in GitHub Desktop.
git cheat sheet
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
# uncommited file to HEAD | |
git diff <path> | |
# uncommited file to before last commit | |
git diff HEAD^ -- <path> | |
#last commit to before last commit | |
git diff HEAD^ HEAD -- <path> | |
#difference between HEAD and n-th grandparent | |
git diff HEAD~n HEAD -- <path> | |
#Another cool feature is whatchanged command | |
git whatchanged -- <path> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment