Search code examples
gitbeyondcompare4

Git for Windows using Beyond Compare 4


I'm using Windows 7 (don't tease; I really have no choice in the matter) and Git for Windows. I'm trying to get Beyond Compare 4 to work as my diff and (eventually) my merge tool. I use Git from the command-line. The problem is I can't get Beyond Compare to launch when I do a diff. Things I've tried:

  • git diff MyChangedFile.txt
  • git difftool MyChangedFile.txt
  • git difftool --tool=bc MyChangedFile.txt
  • Changed the path to use \\ instead of /. It doesn't seem to make a difference which is used.

After typing the command, there is a pause, and the command-prompt comes back, but nothing else happens. There is no error output, and Beyond Compare with my diff doesn't appear. I can enter the path to start Beyond Compare from the command-line and it opens, but I have to surround it with double-quotes:

"c:/Program Files/Beyond Compare 4/bcomp.exe"

I edited my .gitconfig file directly to add double-quotes, but I don't know if Git honors them.

I've followed the instructions from Scooter Software and even tried the manual instructions for GitHub. We're not using GitHub, but another answer here on SO suggested it might work. Neither worked. I also tried most of the things suggested in these SO posts. Probably needless to say, none of them worked.

Details on my environment:

  • Git: git version 2.15.1.windows.2 (64 bit)
  • Windows: Windows 7 Enterprise, 64-bit, Service Pack 1
  • Beyond Compare: Beyond Compare 4, 64-bit Edition, Version 4.2.3 (build 22587)

Pertinent configuration details:

[diff]
    tool = bc
[difftool "bc"]
    path = "c:/Program Files/Beyond Compare 4/bcomp.exe"
[core]
    editor = 'C:\\Program Files\\Notepad++\\notepad++.exe' -multiInst -notabbar -nosession -noPlugin

Anyone have any ideas on what I can try next? Need any further information?


Solution

  • Okay, I guess this was a case of user error. I was trying to diff the files after they were staged. If I try to diff before I stage them, it works.

    SMH...