1

We have made the transition to git in my project and now I want beyond compare to work as it should with it. I have read the instructions on the scootersoftware page. I have tried both alternatives, just now I am using the old one with this in my .gitconfig:

[diff]
    tool = bc3
[difftool "bc3"]
    path = "\"c:/program files/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\""

That doesn't work as i expect it to. This opens up the beyond compare tool as it should, but for some reason I get into the merge mode with three windows at the top and one at the bottom. Any ideas?

Tomas Jansson
  • 22,767
  • 13
  • 83
  • 137

2 Answers2

0

I believe I am getting the windows that you're hoping for, here are my settings.

[diff]
    tool = bc3x
    renames = copies
[difftool "bc3x"]
    cmd = \"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\"
[difftool]
    prompt = false

I have had this same set up for years and hasn't caused me any problems. Hope this helps.

Chris Missal
  • 5,987
  • 3
  • 28
  • 46
0

Not sure whether your case is the same as mine, but I had a similar issue, but it was caused by the merge settings which were also in the .gitconfig

My settings contained lines like

[merge]
tool = BeyondCompare3

[diff]
guitool = BeyondCompare3

[difftool "BeyondCompare3"]
path = C:/Program Files (x86)/Beyond Compare 3/BComp.exe
cmd = \"C:/Program Files (x86)/Beyond Compare 3/BComp.exe\" \"$LOCAL\" \"$REMOTE\"

[mergetool "BeyondCompare3"]
path = C:/Program Files (x86)/Beyond Compare 3/bcomp.exe
cmd = \"C:/Program Files (x86)/Beyond Compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\" 

What appears to happen is that git uses the latter option (with four parameters) rather than the former.

The workaround was to rename the mergetool from

[mergetool "BeyondCompare3"]

to

[mergetool "MergeBeyondCompare3"]

which means that it uses the difftool version with two parameters.

You would expect that you should also be able to change the first section to

[merge]
tool = MergeBeyondCompare3

but if you do that then the command git difftool file1.txt file2.txt uses Merge rather than diff which takes use back to where we were.

Downside is if you actually want to use merge, you will need to use the -t MergeBeyondCompare3 command line option.

sgmoore
  • 15,694
  • 5
  • 43
  • 67