使用vim更新janus后破坏的git commit消息 [英] Using vim for git commit messages broken after updating janus
本文介绍了使用vim更新janus后破坏的git commit消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
git pull
来获取其他人的更改。显示vim编辑器,我输入我的提交信息,输入: w q ,但是代替提交工作,我得到以下错误消息: 错误:编辑器'vi'出现问题。
不提交合并;使用'git commit'来完成合并。
然后我必须手动提交:($ / b
$ b
我如何让git与vim很好地玩?
解决方案
经过一些Google搜索,结果发现答案是运行以下内容:
$ $ p $ g $ git config --global core.editor $(其中vim)
After updating the janus vim distribution there appears to be a problem with using vim for commit messages. The best example of this is when doing a git pull
to get someone else's changes. The vim editor is displayed, I type my commit message, I enter :wq but instead of the commit working, I get the following error message:
error: There was a problem with the editor 'vi'.
Not committing merge; use 'git commit' to complete the merge.
I then have to manually commit :(
How do I get git to play nicely with vim?
解决方案
After a bit of googling, it turns out that the answer is to run the following:
git config --global core.editor $(which vim)
这篇关于使用vim更新janus后破坏的git commit消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文