Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why any quotes are ignored in the Git config?

Tags:

git

windows

git, windows 7. I try set a text editor via different ways:

$ git config --global core.editor "C:\Program Files\Notepad++\notepad++.exe"
$ git config --global core.editor \"C:\Program Files\Notepad++\notepad++.exe\"
$ git config --global core.editor 'C:\Program Files\Notepad++\notepad++.exe'

But when I look the config file (via the git config --list command), I get the same result:

core.editor=C:\Program Files\Notepad++\notepad++.exe

So, I can't do a commit, I get an error:

$ git commit C:\Program Files\Notepad++\notepad++.exe: C:Program: command not found error: There was a problem with the editor 'C:\Program Files\Notepad++\notepad++ .exe'. Please supply the message using either -m or -F option.

I tried edit the .gitconfig file manually (I added the quotes) but it is not help me.

Why quotes are ignored and how can I solve it?

like image 765
Andrey Bushman Avatar asked Feb 14 '23 03:02

Andrey Bushman


1 Answers

Try that

git config --global core.editor "'C:\Program Files\Notepad++\notepad++.exe'"
like image 71
DAXaholic Avatar answered Feb 16 '23 01:02

DAXaholic