1

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

1 Answer 1

1

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.

7
  • I tried that but now its giving me a new error saying that merge.tool is not configured. . ... No known merge tool is available.
    – psj01
    Commented Jun 11, 2016 at 5:13
  • @psj01 What is the version of your git? Also, if you try that (ie. just git config diff.tool winmerge), you need to edit your config first and remove the all mergetool "winmerge" section.
    – VonC
    Commented Jun 11, 2016 at 5:18
  • git version is version 1.9.5.msysgit.1 i did remove all that stuff.. before i did git config diff.tool winmerge..
    – psj01
    Commented Jun 11, 2016 at 5:27
  • @psj01 simply unzip github.com/git-for-windows/git/releases/download/… anywhere you want (no setup or installation required), add it to your %PATH% and try again. git 2.8.4 is more than 2.5. 1.9.5 is not.
    – VonC
    Commented Jun 11, 2016 at 5:28
  • 1
    @psj01 No need for a bash here. Try it in a regular CMD session (Type the Windows key+R, then cmd)
    – VonC
    Commented Jun 11, 2016 at 5:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.