美文网首页Git使用GitGit
There was a problem with the edi

There was a problem with the edi

作者: 宋永建 | 来源:发表于2017-07-16 00:37 被阅读0次

    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>

    相关文章

      网友评论

        本文标题:There was a problem with the edi

        本文链接:https://www.haomeiwen.com/subject/xsjwhxtx.html