【发布时间】:2020-06-07 07:37:28
【问题描述】:
对 git 很陌生,所以如果我犯了任何明显的错误,我很抱歉。
当我执行 git commit 时,它会打印以下消息:
hint: Waiting for your editor to close the file... /c/Users/UserName/AppData/Local/atom/bin/../app-
1.44.0/resources/cli/atom.sh: line 23: cmd.exe: command not found
Aborting commit due to empty commit message.
我假设它与写在 atom.sh 文件中的 cmd.exe 有关,但我不确定,我尝试重新安装 atom 和 git 但没有。我做到了
git config --global code.editor "atom --wait"
我也试过用它的实际目录路径替换“atom”,然后它说:
Waiting for your editor to close the file...
and says aborted due to empty commit message, then opens atom editor.
对不起,如果这是一个有点令人困惑的问题,我已经坚持了这么久。 谢谢
【问题讨论】:
-
看起来像 $PATH 问题。您是否正确设置了它的路径,或者它在某个时候是否正常工作?
-
它从来没有工作,我第一次使用 git commit。我应该将它执行到什么路径,atom.exe 或什么,我应该使用 git config 方法更改它吗?
-
为什么一个sh文件引用了cmd.exe?您使用的是什么操作系统?
-
@CodeWizard .editor 前没有空格
-
试试
PATH=/c/Windows/System32:$PATH...
标签: git atom-editor commit git-commit