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”
- How can I add a subversion history to GIT if the GIT is younger?
- Best fit for including or ignoring vQmod files in versioning
- Truncate GIT History (with 2 permanent branches)
- Git fetch failing using jgit: Remote does not have <branchname> available for fetch
- Git: Having two different repos for public and deployment code
- In git merge conflicts, how do I keep the version that is being merged in?
[gui] recentrepo = C:/Users/Tanner/Desktop/FIRST 2010 Beta/Java/LoganRover [user] name = Tanner Smith email = firstname.lastname@example.org [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.
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 (
"), 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
Hmm. You seem to have smart quotes (
”) 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?