2016-12-15 57 views
1

在做一個混帳拉我得到了以下錯誤:記事本++錯誤混帳拉

enter image description here

錯誤的文字是:「行0:靠近意外的標記語法錯誤‘(’

我做了一個混帳拉這臺機器上一次成功之前。

是什麼原因造成這個錯誤,我該如何解決?

回答

1

檢查O輸出git config --show-origin -l:可能有一個編輯器註冊了錯誤的語法(例如,沒有正確的引號或轉義字符),這會導致git配置中的路徑出現問題。

使用git config --edit編輯正確的配置(系統,全局或本地),並刪除不正確的設置。

檢查「How can I set up an editor to work with Git on Windows?」:因爲Git (for Windows) 2.5.3+,簡單的git config core.editor notepad應該就足夠了。

或者,記事本++:

git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" 
+0

事實證明,這是問題,不帶引號的路徑exe文件。 .gitconfig中的行應爲:editor =「'C:\\ Program Files(x86)\\ Notepad ++ \\ notepad ++。exe'」 –