.gitconfig error

I edited my .gitconfig file to add support for LabView and it appears that I did something that Git doesn’t exactly like. The problem is it (Git) doesn’t tell me what it doesn’t like. What did I do wrong?

The error message doesn’t help much either:
“fatal: bad config file line 13 in c:/Users/Tanner/.gitconfig”

    recentrepo = C:/Users/Tanner/Desktop/FIRST 2010 Beta/Java/LoganRover

    name = Tanner Smith
    email = tanner@notimportant.net

[merge "labview"]
    name = LabView 3-Way Merge
    driver =  “C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe” “C:\Program Files\National Instruments\LabVIEW 8.6\LabVIEW.exe” %O %B %A %A
    recursive = binary

And I’m not seeing a line 13, but usually that would mean something is wrong at the end? I don’t know, Git is new to me.

  • Is `git rebase master` always followed by `git pull --rebase` and then `git push --force`?
  • Version-control: svcmap, disco, xsd, wsdl, svcinfo and datasource files
  • Is code safe in git repository on a remote server? How to secure it?
  • Does “pure git” have the concept of a pull request?
  • MSBuild — Use the .csproj file or roll your own?
  • Is it possible to have multiple local git repositories in the same folder?
  • How to recover a merge commit after a rebase on the same commit?
  • Eclipse setup for git project
  • 5 Solutions collect form web for “.gitconfig error”

    A/ I confirm the problematic line is

        driver =  “C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe” “C:\Program Files\National Instruments\LabVIEW 8.6\LabVIEW.exe” %O %B %A %A

    B/ The quotes are not the issue ( or "), although the resulting command will not work unless you are using " only. But at least does not trigger the “invalid .gitconfig” error message.

    C/ The problem is the \ which have to be escaped themselves.

        driver =  “C:\\Program Files\\National Instruments\\Shared\\LabVIEW Merge\\LVMerge.exe” “C:\\Program Files\\National Instruments\\LabVIEW 8.6\\LabVIEW.exe” %O %B %A %A

    will work.

    Hmm. You seem to have smart quotes ( and ) on the driver line instead of straight quotes ("). That might cause some problems. Another thing to check is to see if there is a mix of LF and CRLF line endings; that might make the line count be different than what it looks like. Try looking at your file in a hex editor, or an editor that will display all whitespace characters, to see if you have a mix of line endings.

    I see a couple things that may be a problem. One of which is you are using curly quotes on line 10, and no quotes on line 2.

    What editor did you edit this with? Please use a plain text editor like notepad or vim.

    Lastly: use git-config to edit this file, rather than by hand. See the following link:


    Other possible problems are the file paths with spaces in them. I would remove the spaces and replace them with underscores or dashes.

    I see forward slashes (/) on the second line and backward (\) on the LabVIEW Merge line.
    Maybe they are the culprit?


    Git Baby is a git and github fan, let's start git clone.