Just a quick note, as much to my self as anyone else. I’m getting started with Git and wanted to use notepad++ as the editor for commits.
So I followed some basic instructions and tried setting it up like this:
git config --global core.editor "c:\Program Files (x86)\Notepad++\notepad++.exe"
and got this:
c:\Program Files (x86)\Notepad++\notepad++.exe: -c: line 0: syntax error near unexpected token `('
c:\Program Files (x86)\Notepad++\notepad++.exe: -c: line 0: `c:\Program Files (x86)\Notepad++\notepad++.exe \$@\'
error: There was a problem with the editor 'c:\Program Files (x86)\Notepad++\notepad++.exe'.
Please supply the message using either -m or -F option.
Helpful…
Different variations yielded the same results:
git config --global core.editor '"c:\Program Files (x86)\Notepad++\notepad++.exe"'
git config --global core.editor 'c:\Program Files (x86)\Notepad++\notepad++.exe'
git config --global core.editor "'c:\Program Files (x86)\Notepad++\notepad++.exe'"
Until this Stack Overflow answer pointed me in the right direction:
git config --global core.editor "'c:/Program Files (x86)/Notepad++/notepad++.exe'"
So, keep those slashes going the right way