Skip to content

Instantly share code, notes, and snippets.

@eliza-abraham
Last active December 31, 2015 14:59
Show Gist options
  • Save eliza-abraham/8004070 to your computer and use it in GitHub Desktop.
Save eliza-abraham/8004070 to your computer and use it in GitHub Desktop.
Differences in files between different branches/commits
Compare the differences between two branches
To produce the diff between the tips of the two branches.
$ git diff branch_1..branch_2
To find the diff from their common ancestor to test, you can use three dots instead of two:
$git diff branch_1...branch_2
In a specific file
&$git
Compare the differences in a file between two commits
$ git diff $start_commit..$end_commit -- path/to/file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment