您的位置:首页 > 其它

There was a problem with the editor ‘vi’

2017-07-13 01:15 281 查看

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/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git editor-vi git-config
相关文章推荐