There was a problem with the editor 'vi'

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了。

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容