2

I am trying to setup Beyond Compare 4 (v4.2.3) as my difftool for Git (v2.15.1.windows.2) but I cannot get it to launch. I have followed the instructions they've given, but it just doesn't work!

My .gitconfig looks like this:

[diff]
    tool = bc3
[difftool "bc3"]
    path = c:/Program Files/Beyond Compare 4/bcomp.exe
[merge]
    tool = bc3
[mergetool "bc3"]
    path = c:/Program Files/Beyond Compare 4/bcomp.exe

When I run, the following:

git difftool src\CF1.Charles.Helpers\CF1.Charles.Helpers.csproj

Nothing happens! I just get the command prompt again.

What am I missing?

J86
  • 14,345
  • 47
  • 130
  • 228

2 Answers2

3

I was Googling this very problem and came across this page. It got me 90% of the way there, but the other answer given is for Beyond Compare 3 and the $(cygpath -w $LOCAL) didn't work. I'm using git bash, so that may be the difference there.

Anyway, here's what works for me with BC4 and git bash.

[merge]
    tool = bc4
[mergetool "bc4"]
    cmd = \"C:\\Program Files\\Beyond Compare 4\\Bcompare.exe\" "$LOCAL" "$REMOTE"
[mergetool "vscode"]
    cmd = code --wait $MERGED
[diff]
    tool = bc4
[difftool "bc4"]
    cmd = \"C:\\Program Files\\Beyond Compare 4\\Bcompare.exe\" "$LOCAL" "$REMOTE"
[difftool "vscode"]
    cmd = code --wait --diff $LOCAL $REMOTE

Note that I left my VS Code configuration in here too. I haven't actually tried doing a merge with Beyond Compare yet. But if you want to switch between VS Code and Beyond Compare, you just change the tool = line to the one you want.

dwilliss
  • 862
  • 7
  • 19
1

Try the following:

[merge]
        tool = bc3
[mergetool "bc3"]
        cmd = \"C:\\Program Files (x86)\\Beyond Compare 3\\Bcomp.exe\" "$(cygpath -w $LOCAL)" "$REMOTE"
[diff]
        tool = bc3
[difftool "bc3"]
        cmd = \"C:\\Program Files (x86)\\Beyond Compare 3\\Bcomp.exe\" "$(cygpath -w $LOCAL)" "$REMOTE"
kingJulian
  • 5,601
  • 5
  • 17
  • 30