You want something different from the straightforward git diff branch_1 branch_2? (Note, if the names branch_1 and branch_2 also name files, you need git diff branch_1 branch_2 --)
– torek
The cited duplicate does not answer the question... Determining which files have changed with git diff --name-status master..branchName is markedly different than seeing the exact differences between branches with something like git diff branch_1 branch_2. Or maybe I'm missing something obvious...
– jww
Not only is the "duplicate" a different question, this question is the number one google match for "git diff two branches".
– Rob Osborne
git difftool branch..otherBranch lets you SEE the differences in the Visual tool that you choose. e.g. Meld. This is the answer.
– Greg Rundlett
1 Answers
3481
votes
git diff branch_1..branch_2
That will produce the diff between the tips of the two branches. If you'd prefer to find the diff from their common ancestor to test, you can use three dots instead of two:
git diff branch_1...branch_2
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
git diff branch_1 branch_2
? (Note, if the names branch_1 and branch_2 also name files, you needgit diff branch_1 branch_2 --
) – torekgit diff --name-status master..branchName
is markedly different than seeing the exact differences between branches with something likegit diff branch_1 branch_2
. Or maybe I'm missing something obvious... – jwwgit difftool branch..otherBranch
lets you SEE the differences in the Visual tool that you choose. e.g. Meld. This is the answer. – Greg Rundlett