I am using Windows 10 and notepad++, and I was getting this error message:
line 0: syntax error near unexpected token `(' git windows
So I make the setup in this way:
git config --global core.editor 'C:/Program\ Files\ \(x86\)/Notepad++/notepad++.exe'
and it works