最近我在我的终端上安装了bash-it。现在,当我尝试执行git commit时,终端显示了以下错误:
/usr/bin/mate -w: /usr/bin/mate: No such file or directory error: cannot run /usr/bin/mate -w: No such file or directory error: There was a problem with the editor '/usr/bin/mate -w'. Please supply the message using either -m or -F option.
在bash-it之前,提交命令正确地打开了vim。当然,我尝试过将git中的core.editor更改为"vim“,但无论如何它都不起作用。
你能帮我解决这个问题吗?我真的很喜欢vim,它非常简单和快速.我不想使用TextMate来编辑提交消息。
PS:我在用Mac
发布于 2014-11-14 13:44:27
问题是我在.bash_profile中有两个指向.bash_profile的环境变量,所以我将它们编辑为指向vim
发布于 2014-11-14 13:23:34
尝试使用以下命令。应该能够将编辑器设置为vi或vim。但是,您可能必须给出vim的绝对路径。
git config --global core.editor vim发布于 2018-02-05 08:01:27
"abalos“回答说,
git config --global core.editor vim如果不想使用vim,或者在某些情况下没有安装vim,也可以使用nano编辑器。
git config --global core.editor nanohttps://stackoverflow.com/questions/26930924
复制相似问题