Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git difftool does not launch Beyond Compare

I am struggling with git making run Beyond Compare as my difftool.

I'm using "Git For Windows", Windows 7 32 bits and Beyond Compare 4

$ git --version
git version 1.9.5.msysgit.1
$ git config --list

[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

Now I've read others questions here and there and followed instructions such as :

  • Change 'bc3' by other name i.e. 'abc3' or 'beyondcompare'
  • The command : git difftool --tool=bc3 MyFile.java
  • Changing 'bc3'path in .gitconfig to 'c:\Program Files\Beyond Compare 4\bcomp.exe'
  • Added $LOCAL $REMOTE to path

What I've realized is that it always launches the default diff console viewer/tool (vimdiff if i'm not wrong) although passing the above mentioned parameter '--tool=bc3' or '--tool=anyname', to 'git difftool' command.

Finally, it just works for 'git mergetool' , in this case beyond compare is launched and as you can see the parameters are the same.

If I've forgotten something or more details are needed, please let me know Thanks

"When I enter the command git difftool"

image

like image 312
diegot Avatar asked Nov 01 '22 00:11

diegot


1 Answers

To configure Beyond Compare 4 as an external diff tool in Git for Windows 1.9.5, follow the instructions on Scooter Software's Using Beyond Compare with Version Control Systems page.

To diff a file in Beyond Compare after you've followed the configuration instructions:

git difftool filename.ext

If that still doesn't work, verify you have the correct settings in your c:\users\username\.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

If that still doesn't fix it, make sure you don't have a repository specific setting in .git\config overriding the global settings.

like image 99
Chris Kennedy Avatar answered Nov 15 '22 03:11

Chris Kennedy