$ git commit
error: cannot run vim: No such file or directory
error: There was a problem with the editor 'vim'.
Please supply the message using either -m or -F option.
Run Code Online (Sandbox Code Playgroud)
如何克服错误并定义编辑器?
Mic*_*zek 13
除了vim
像建议的错误消息一样在命令行上安装或指定提交消息之外,还有几种方法可以告诉 git 它应该使用哪个编辑器。您可以设置core.editor
属性(针对该项目在本地,或针对所有 git 全局设置):
$ git config --global core.editor nano
Run Code Online (Sandbox Code Playgroud)
您还可以设置EDITOR
环境变量,如果core.editor
未设置,git 将依赖该变量:
$ export EDITOR=nano
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
16635 次 |
最近记录: |