我创建了一个新的本地存储库并对其进行初始化,然后我将ST3定义为默认编辑器
git config --global core.editor "'C:\Program Files\Sublime Text 3\sublime_text.exe' -w"
当我提交时我得到了这个错误
hint: Waiting for your editor to close the file... Skipping command-line '"C:\Users\Sony\bin\..\usr\bin\bash.exe"'
('C:\Users\Sony\bin\..\usr\bin\bash.exe' not found)
Need a valid command-line; Edit the string recources accordingly
error: There was a problem with the editor ''C:\Program Files\Sublime Text 3\sublime_text.exe' -w'.
Please supply the message using either -m or -F option
答案 0 :(得分:1)
请改为shown here:
git config --global core.editor "'C:/Program Files/Sublime Text 3/subl.exe' -w"
由于引用(简单和双引号)的解释方式,从CMD(而不是bash会话)完成后效果会更好。