【发布时间】:2018-08-16 18:55:24
【问题描述】:
我已经配置了我的核心编辑器,一切正常。我可以从命令行在我的编辑器中打开任何文件。
但是,当我进入“git commit”时,我收到了这个错误:
hint: Waiting for your editor to close the file... fatal: cannot run --
unset-all: No such file or directory
error: unable to start editor '--unset-all'
Please supply the message using either -m or -F option.
我首先尝试过使用 Sublime,而不是 Brackets 和 Atom。我什至尝试重置 .gitconfig (rm ~/.gitconfig),但没有任何改变。
有什么命令可以修复这个错误吗?还是我必须卸载 git?
【问题讨论】:
-
您最初用于配置编辑器的命令是什么?
.gitconfig有好几级,其中一个好像指定了错误的路径。 -
"我已经配置了我的核心编辑器" ... 通过做什么?能够在 bash 提示符下打开编辑器与配置 git 以在需要生成编辑器时运行正确的命令是完全不同的问题。从错误消息来看,您似乎已将 git 配置为运行
--unset-all作为编辑器命令,这肯定不是正确的配置。 -
@kowsky,@MarkAdelsberger,命令是
$ git config --global core.editor "subl -n -w"。但它不起作用,所以我用$ git config --global --unset-all core.editor删除了它。在我使用$ /usr/local/bin/Brackets添加括号的路径之后
标签: git git-bash macos-high-sierra