There was a problem with the editor ‘vi’

来源:互联网 发布:巫师3上古卷轴5 知乎 编辑:程序博客网 时间:2024/05/22 05:11

There was a problem with the editor ‘vi’


在项目中通过git commit -m'modify message'提交代码,发现提交的modify message不太准确,想要修改。使用git commit --amend命令修改modify message,在vim中编辑完message之后,w+q退出的时候报错且message保存失败,

错误信息如下:


图片名称


error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.

解决方案:


图片名称


git config --global core.editor /usr/bin/vim

在次执行git commit --amend就OK了。

参考:
http://tooky.co.uk/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x/

阅读全文
0 0
原创粉丝点击