I have been trying to figure out how configure beyond compare to be used via command line when using Git on windows (cygwin). Based on beyond compare's documentation they ask you to just use "path" to the bcomp.exe installation and everything should work. But it does not automatically pick up the "Local", "Base" and "Remote" params. I am using Beyond compare 3.0 PRO.
I figured out the answer with a little bit of tinkering around with the git config. Note: I edited the global git config in notepad and here's how my config looks after i was done. Hope this helps someone.
[diff]
tool = bc4
[difftool "bc4"]
cmd = "C:/program\\ files\\ \\(x86\\)/beyond\\ compare\\ 4/bcomp.exe $LOCAL $REMOTE"
[merge]
tool = bc4
[mergetool "bc4"]
cmd = "C:/Program\\ Files\\ \\(x86\\)/Beyond\\ Compare\\ 4/Bcomp.exe $LOCAL $REMOTE $BASE $MERGED"
trustExitCode = true
keepBackup = false
Beyond compare version 3.
For Linux in terminal type following commands:
git config --global diff.tool bc3
git config --global difftool.prompt false
git config --global difftool.bc3 trustExitCode true
git config --global merge.tool bc3
git config --global mergetool.bc3 trustExitCode true
For windows type following (you need to tell git the path to bcomp.exe)
git config --global difftool.bc3.path "c:/program files (x86)/beyond compare 3/BCompare.exe"
git config --global mergetool.bc3.path "c:/program files (x86)/beyond compare 3/bcomp.exe"
To get Visual Studio to actually understand that a merge had taken place I had to put single quotes around the path like this. This is for Beyond Compare 4 Pro on Windows.
[diff]
tool = bc
[difftool "bc"]
cmd = '"C:/Program Files/Beyond Compare 4/BComp.exe"' "$LOCAL" "$REMOTE"
[merge]
tool = bc
[mergetool "bc"]
cmd = '"C:/Program Files/Beyond Compare 4/BComp.exe"' "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
trustExitCode = true
keepBackup = false
Just a follow up note: you can edit the config file directly from the command line with the following code. - It will launch you command lines default editor.
$ git config --global --edit
P.s. the tip above worked for me too. I'm using win7 enterprise.
© 2022 - 2024 — McMap. All rights reserved.