git difftool does not launch Beyond Compare
Asked Answered
A

3

7

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

Airs answered 10/7, 2015 at 6:32 Comment(3)
It seems pretty different for merge tool and diff tool. Read this post: #255702Lemieux
See scootersoftware.com/support.php?zz=kb_vcs#gitwindows – If it doesn’t work, try the manual configuration shown in the section below for “GitHub for Windows”.Azriel
Once configured, try this instead: git difftool --tool=bc3 HEAD botnet. javaFincher
H
2

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.

Hoodoo answered 14/7, 2015 at 22:20 Comment(0)
Y
1

Write cohfig format always changes. This works for Windows 10, VS 2019, Git 2.25

[merge]
    tool = BeyondCompare4
[diff]
    guitool = beyondcompare4
    tool = beyondcompare4
[core]
    autocrlf = false
    editor = \"C:\\Program Files\\Microsoft VS Code\\Code.exe\" --wait
[difftool "beyondcompare4"]
    path = \"C:\\Program Files\\Beyond Compare 4\\bcomp.exe\"
    cmd = \"C:\\Program Files\\Beyond Compare 4\\bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
    keepBackup = false
[mergetool "BeyondCompare4"]
    path = \"C:\\Program Files\\Beyond Compare 4\\bcomp.exe\"
    cmd = \"C:\\Program Files\\Beyond Compare 4\\bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
Yawl answered 15/3, 2020 at 14:22 Comment(0)
I
0

Your git config --list output is bizarre. Mine has name-value pairs and no section headers (irrelevant properties omitted):

diff.tool=bc3
difftool.bc3.path=c:/Program Files (x86)/Beyond Compare 3/bcomp.exe
merge.tool=bc3
mergetool.bc3.path=c:/Program Files (x86)/Beyond Compare 3/bcomp.exe

For me, Beyond Compare 3 works fine with git difftool <filename>, no strange options. Beyond Compare 4 is very similar.

My git version is almost the same

git --version
git version 1.9.5.msysgit.0

Maybe you set options for another repository; if git difftool comes up with diff -cc you definitely have not configured Beyond Compare as the default diff tool. Or maybe your bcomp.exe is acting up.

Indoctrinate answered 10/7, 2015 at 7:13 Comment(1)
What I paste above was the output of my "config" file. It wasn't exactly the output of the command "git config --list"Airs

© 2022 - 2024 — McMap. All rights reserved.