美文网首页
Fixed "There was a problem with

Fixed "There was a problem with

作者: 穿山甲到底说了什么 | 来源:发表于2016-10-08 18:43 被阅读0次

在用git提交的时候 如果不小心打错了commit -m 'xxx' xxx里面的内容的话,可以修改,命令是git commit --amend

apple:yunlu_meeting apple$ git commit -m 'delete redu'
//这时候发现打字还没打完 电脑卡了手贱 多按了回车,郁闷,于是再一次修改提交信息
apple:yunlu_meeting apple$ git commit --amend
//WTF,`Vi`编辑器遇到问题,
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 -f

完整的终端打印如下:

apple:yunlu_meeting apple$ git commit --amend
error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.
apple:yunlu_meeting apple$ git config --global core.editor  /usr/bin/vim -f 
apple:yunlu_meeting apple$ git commit --amend
[addChat e38cfe4] delete redundant key-values in HBuilder-Hello-Info.plist
 Date: Sat Oct 8 17:48:46 2016 +0800
apple:yunlu_meeting apple$ git push origin addChat:addChat
Counting objects: 198, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (114/114), done.

相关文章

网友评论

      本文标题:Fixed "There was a problem with

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