【发布时间】:2016-02-05 22:02:54
【问题描述】:
我在使用 git 和我的编辑器时遇到了一个奇怪的问题。我在 Stack Overflow 上找遍了,一直找不到类似的问题。
执行git commit 时出现以下错误:
-w: -w: command not found
error: There was a problem with the editor ' -w'.
Please supply the message using either -m or -F option.
我试过emacs、VIM和Atom,在全局.gitconfig文件中设置如下:
编辑器 = /usr/bin/emacs
我还在.bash_profile 中设置了如下编辑器:
export EDITOR=emacs
我使用我选择的任何编辑器都会收到相同的错误。
除此之外,所有编辑器都可以正常工作,git 也是如此。
对于解决此问题的任何帮助,我将不胜感激。
【问题讨论】:
-
git config --get core.editor告诉你什么?