Reputation: 81
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"
[gui]
recentrepo = C:/Users/Tanner/Desktop/FIRST 2010 Beta/Java/LoganRover
[user]
name = Tanner Smith
email = [email protected]
[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.
Upvotes: 2
Views: 8318
Reputation: 3115
I see forward slashes (/) on the second line and backward (\) on the LabVIEW Merge line.
Maybe they are the culprit?
Ton
Upvotes: 0
Reputation: 1329492
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.
Upvotes: 4
Reputation: 9600
Other possible problems are the file paths with spaces in them. I would remove the spaces and replace them with underscores or dashes.
Upvotes: 0
Reputation: 333284
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.
Upvotes: 4
Reputation: 137582
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:
http://git-scm.com/docs/git-config
Upvotes: 1