git commit 出现There was a problem with the editor ‘vi’

今天在Mac OS X 10.9.3上使用git的时候遇到这么一个问题,执行git commit操作会显示如下错误:
There was a problem with the editor ‘vi’

搜寻了一下相关的解决方案,发现好多人遇到了这个问题。似乎是因为vim的返回值有问题导致的。
所以执行一下下面这条命令:
$ git config –global core.editor /usr/bin/vim
将git使用的编辑器强制指定一下,就可以正常使用了。具体的错误分析就不翻译了,贴在下面:

I have had an annoying problem with git and vi. I like to use vim to edit my commit messages, but I’ve been hit with this annoying message (更多…)