Skip to content

Instantly share code, notes, and snippets.

@VicoErv
Last active August 23, 2018 01:07
Show Gist options
  • Save VicoErv/ac21cbb7785e5414ff7cadeb07ab1ae1 to your computer and use it in GitHub Desktop.
Save VicoErv/ac21cbb7785e5414ff7cadeb07ab1ae1 to your computer and use it in GitHub Desktop.

Revisions

  1. VicoErv revised this gist Aug 23, 2018. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion git-diff.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,6 @@
    `git diff COMMIT~ 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.

  2. VicoErv revised this gist Aug 23, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion git-diff.md
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    git diff COMMIT~ COMMIT
    `git diff COMMIT~ COMMIT`
  3. VicoErv created this gist Aug 23, 2018.
    1 change: 1 addition & 0 deletions git-diff.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    git diff COMMIT~ COMMIT