psj01
psj01

Reputation: 3245

adding winmerge as mergetool in git

I am getting an error saying that

fatal bad config file line 24 in .git/config

Here is what I have in my config file..

[mergetool "winmerge"]
        name = WinMerge
        trustExitCode = true
        cmd = "C:\Program Files (x86)\WinMerge\WinMergeU.exe" -u -e -dl \"Local\" dr \"Remote\" $LOCAL $REMOTE $MERGED

line 24 is the line starting with "cmd = "...

Can anyone tell me what I am doing wrong here?

I tried to follow this

Upvotes: 1

Views: 2521

Answers (1)

VonC
VonC

Reputation: 1323953

Try with '/' instad of \:

cmd = "C:/Program Files (x86)/WinMerge/WinMergeU.exe" -u -e -dl \"Local\" dr \"Remote\" $LOCAL $REMOTE $MERGED

Note that, as I noted before (details here), since git 2.5+, a simpler config shoud be enough:

git config diff.tool winmerge

git itself knows about the right mergetool.cmd syntax to use with winmerge.

Upvotes: 1

Related Questions