git visual diff between branches

Use git diff with a range.

git diff branch1..branch2

This will compare the tips of each branch.

If you really want some GUI software, you can try something like SourceTree which supports Mac OS X and Windows.


To see a visual diff of all differences between two branches I like to merge the two branches - WITHOUT committing the merge - and then use git gui or git Extensions to get an overview of the differences.

Git command line for merging without commiting:

git checkout branchA
git merge --no-commit --no-ff branchB

Then when done, you can undo the merge with

git merge --abort

(h/t to @jcugat's for the comment)

Tags:

Git

Diff