Last active
December 31, 2015 14:59
-
-
Save eliza-abraham/8004070 to your computer and use it in GitHub Desktop.
Differences in files between different branches/commits
This file contains 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
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