Domanda

I am trying to use beyond compare 2 with Git as a mergetool, following this example: http://www.iokom.com/drupal/node/4

The example uses beyond compare 3, so I simply substituted my directory structure, I'm not surprised it didn't work. I have looked around, but most tutorials use BC3, and many posts here. Is BC2 compatible?

I edited my global config file as shown in the link, but get the following...

Mark@MARK-PC /c/git ((ref: re...))
$ git mergetool
fatal: bad config file line 27 in C:\Program Files (x86)\Git/etc/gitconfig

How might I go about using BC2? What does this error mean? Is it giving out about my path or are the parameters in the config wrong for BC2? Thanks in advance!

È stato utile?

Soluzione

Beyond Compare 2 does not support 3-way merging with an ancestor so the directions as written won't work. You can configure it to do a 2-way merge using the /savetarget= switch. Try this configuration instead:

[merge]
tool = bc2

[mergetool "bc2"]
cmd = 'C:\Program Files (x86)\Beyond Compare 2\BC2.exe' \
  "$PWD/$LOCAL" \
  "$PWD/$REMOTE" \
  /savetarget="$PWD/$MERGED"
keepBackup = false
trustExitCode = false

Note that since it isn't able to use the ancestor file it can't detect conflicts. You'll have to go through the files and merge everything manually. Also, the interface is still the 2-way comparison; you need to pull all of the changes from one file into the other and then save it. The /savetarget switch makes it so any time you save either file it will actually overwrite that path.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top