git visual diff between branches

This answer is great for seeing a visual diff between two files that are checked into git: How do I view 'git diff' output with a visual diff program?

However, I'd like to see a visual diff between two branches. So far, my best bet seems to be:

git diff --name-status master dev

which isn't very informative and not very visual.

Is there anything better out there?


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)