2

I tried to do a merge in GitBash today, but got the following error:

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'.

I can't figure out why it's throwing this error, and nothing's changed in Notepad++ or GitBash. Any idea on where I can search or fix this?

2
  • Did you define notepad++ as editor or mergetool for git? Commented Feb 7, 2017 at 17:46
  • I don't remember doing it explicitly, but I must have, right? I set it all up three years back now :/ Commented Feb 7, 2017 at 17:47

1 Answer 1

2

Check you git config -l output (with, if you have a recent enough Git, git config --show-origin -l).
You can check if its declaration is similar to this answer.

You can see there your configuration, and get the line involving Notepad++.

Check if the issue persists if you uncompress (and add to your %PATH%) the latest portable Git for Windows: PortableGit-2.11.1-64-bit.7z.exe

set PATH=C:\git2.11.1\bin;C:\git2.11.1\usr\bin;%PATH%
git bash
# try again the merge
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.