Is there a way to use GitHub\'s \"compare view\" to view the diff between the current versions of two branches? (That is, to view the same diff that you would get if y
GitHub only supports the triple dots (...
) range shortcut specification.
From the git diff documentation:
git diff [--options] .. [--] […]
This is synonymous to the previous form. If on one side is omitted, it will have the same effect as using HEAD instead.
git diff [--options] ... [--] […]
This form is to view the changes on the branch containing and up to the second , starting at a common ancestor of both . "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B". You can omit any one of , which has the same effect as using HEAD instead.
GitHub now (Sept. 2018, 4 years later) explicitly supports "Three-dot and two-dot Git diff comparisons".
The URL https://github.com/github/linguist/compare/c3a414e..faf7c6 will display:
The message is:
This is a direct comparison between two commits made in this repository or its related forks
Now you can easily see the differences between two commits without comparing from their common merge base commit like a three dot comparison would.