Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mergetool from .gitconfig being ignored?

git config --global mergetool.bc3 "\"c:/program files (x86)/beyond compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\""

git mergetool

/usr/lib/git-core/git-mergetool--lib: line 116: bcompare: command not found

This is extremely odd, because both ./.git/config and ~/.gitconfig look correct. Neither lists an entry for bcompare. Can git read or store configuration from anywhere other than .git/config or ~/.gitconfig?

like image 829
Stefan Kendall Avatar asked Sep 15 '11 17:09

Stefan Kendall


People also ask

How do you exit a git Mergetool?

Use :cquit , or git merge --abort and do the merge again.

How do I resolve merge conflict in Mergetool?

Use git mergetool to run one of several merge utilities to resolve merge conflicts. It is typically run after git merge. If one or more <file> parameters are given, the merge tool program will be run to resolve differences on each file (skipping those without conflicts).

What does git Mergetool do?

The git mergetool helps the developer to resolve conflicts in an efficient way. It provides a GUI where you can look at versions from your current branch, remote branch, common ancestor and final merged version, all in one window, which we will see going further into the article.


1 Answers

Looks like the same issue as this guy had. It appears bc3 is a builtin tool name, and git won't allow that name to be overridden. Try using a name other than bc3.

I used "BeyondCompare3"

[mergetool "BeyondCompare3"]
    path = C:/Program Files/Beyond Compare 3/bcomp.exe
    cmd = \"C:/Program Files/Beyond Compare 3/bcomp.exe\" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
like image 68
Andy Avatar answered Sep 22 '22 03:09

Andy