Created
December 29, 2018 17:29
-
-
Save RagedUnicorn/cf02f9590c25ed3946ca57f570875b67 to your computer and use it in GitHub Desktop.
Git diff examples
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
| // generate a diff between a branch and the master | |
| git diff master..[branch] | |
| // generate a diff between last commit and current directory | |
| git diff | |
| // if theres already staged data you can see a diff of only the cached files | |
| git diff --cached | |
| // shows the diff between the index and your last commit | |
| git diff HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment