Getting Beyond Compare to Diff 2 Branches Simultaneously
Asked Answered
G

2

19

>>git difftool branch1 branch2 opens my difftool (Beyond Compare:BC) with every file that has a diff between the branches. I have to close BC after each file just for it to reopen with the next file.

BC can diff whole directories and multiple files.

Is there a way to get git difftool to open all files simultaneously, or diff the whole tree simultaneously?

Gorcock answered 29/7, 2010 at 18:45 Comment(2)
Are you using version 3.0? I only ask because that has a tabbed interface.Chronology
Yes I am. I want it to show all diff-ed files in the tabs for example, or in the compared directory structure mode.Gorcock
B
22

Starting with git v1.7.11, you can use git difftool --dir-diff to perform a directory diff.

The answer that follows applies to git installations older than v1.7.11.


This issue is not related to BC, but to the way git works. Fortunately, there is a solution at this URL - git-diffall

Birnbaum answered 24/5, 2011 at 21:26 Comment(3)
Indeed, it is a Git issue. I tried, but I couldn't get it to work properly on Windows. The script ran fine (in the Bash shell) and BC opens in the right place, but the tmp files don't seem to exist.Gorcock
In the end, I settled for this goo.gl/YPd2s. It was linked from the link you sent. So thanks!Gorcock
funny it runs fine for me on windows and osxBirnbaum
M
18

I used these commands to set Beyond Compare 4 (despite the bc3 you see in them) as the diff / merge tools:

git config --global diff.tool bc3
git config --global difftool.bc3.path "C:/Program Files/Beyond Compare 4/bcomp.exe"

git config --global merge.tool bc3
git config --global mergetool.bc3.path "C:/Program Files/Beyond Compare 4/bcomp.exe"

Then I compared two branches like this, where "oldbranchname" and "newbranchname" are the names of the two branches I wanted to compare.

git difftool -d --tool=bc3 oldbranchname newbranchname

I get the folder view as if I compared two folders with beyond compare. The only thing of note is that it will not show identical files in the comparison, but that has not bothered me.

Morgue answered 30/8, 2016 at 18:34 Comment(3)
Yes, the -d option does the the trick, is it equivalent to --dir-diff which works.Gorcock
On a Mac I found I had to change the option to follow symlinksEachern
The option to follow symlinks on the Mac with Beyond Compare 4 is not in the usual preferences area. BC4 staff note how to set it on their forum: scootersoftware.com/vbulletin/…Baryram

© 2022 - 2024 — McMap. All rights reserved.