gitbeyondcomparegit-difftoolbeyondcompare4

git difftool Beyond Compare 4 not diffing local with remote


I am using CYGWIN and Beyond Compare 4 Pro Edition. I have set up the following .gitconfig file:

[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

After making a small change to a local file, I run the following command in CYGWIN:

git difftool

Beyond Compare 4 launches correctly but only with the left side in all red. The right side is empty.

I would like this to launch with a simple comparison of my local changes (left) compared to the remote (right).

I was under the assumption that this was the default behavior? Is there another setting I am missing or is this only avaiable


Solution

  • I was able to solve my problem by configuring my .gitconfig file to the following:

    [difftool "bc3"]
         cmd = \"c:/program files/beyond compare 4/bcomp.exe\" "$(cygpath -w $LOCAL)" "$REMOTE"
    

    This brings up a diff of the local and remote when doing a git difftool