git(osx)上的一个git commit无法正确提交的问题

我发现在我修改我自己的文件之后企图使用git commit编辑更加详细的争对这次提交的信息的时候

我mac上的vi编辑器貌似 出现了问题 大概报这个错。

error: There was a problem with the editor 'vim'.
Please supply the message using either -m or -F option.

我有点疑惑,按道理来说保存之后 就已经自动提交了,而不是像这样被报错阻止了。

后来在 Google Group: vim_mac 这个帖子中找到了解决的办法,就是使用完整的 Vim 路径—— /usr/bin/vim :

$ git config --global core.editor /usr/bin/vim

至于为什么会这个样子我也不是太清楚呢。。。

原文地址:https://www.cnblogs.com/piperck/p/4949536.html