Skip to content

Instantly share code, notes, and snippets.

@sumitpore
Last active August 4, 2020 11:48
Show Gist options
  • Save sumitpore/936d506f2c2c8af32da9d147bc4da254 to your computer and use it in GitHub Desktop.
Save sumitpore/936d506f2c2c8af32da9d147bc4da254 to your computer and use it in GitHub Desktop.
Git Diff Commands

See changes which are going to be staged (i.e. before doing git add)

git diff

See changes which are staged (i.e. after doing git add)

git diff --cached

See Changes which were commited in last commit (i.e. after doing git commit)

git diff HEAD^..HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment