Skip to content

Instantly share code, notes, and snippets.

@VicoErv
Last active August 23, 2018 01:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VicoErv/ac21cbb7785e5414ff7cadeb07ab1ae1 to your computer and use it in GitHub Desktop.
Save VicoErv/ac21cbb7785e5414ff7cadeb07ab1ae1 to your computer and use it in GitHub Desktop.
get diff from commit

To see the diff for a particular COMMIT hash:

git diff COMMIT~ COMMIT will show you the difference between that COMMIT's ancestor and the COMMIT. See the man pages for git diff for details about the command and gitrevisions about the ~ notation and its friends.

Alternatively, git show COMMIT will do something very similar. (The commit's data, including its diff - but not for merge commits.) See the git show manpage.

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