我今天尝试在 GitBash 中进行合并,但收到以下错误:
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'.
我不明白为什么它会抛出这个错误,并且 Notepad++ 或 GitBash 中没有任何变化。知道在哪里可以搜索或解决这个问题吗?
最佳答案
检查 git config -l
输出(如果您有足够新的 Git,则使用 git config --show-origin -l
)。
你可以检查它的声明是否是 similar to this answer .
您可以在那里看到您的配置,并获取涉及 Notepad++ 的行。
如果您解压缩(并将 latest portable Git for Windows 添加到您的 %PATH%
),请检查问题是否仍然存在。 : 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
关于notepad++ - GitBash 在合并时返回 Notepad++ 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42096495/