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>