I\'m a clumsy typist, and I don\'t use vi/vim very often, but I do use it for commit messages. However, if you type a wrong command while editing a commit message (:Wq
As mentioned in several posts vim is exiting with a exit code other than zero. You can fix it by explicitely setting the git editor to the full vim path:
git config --global core.editor /usr/bin/vim
If I remember correctly I fixed the issue by installing a homebrewed vim. Make sure your path is set correctly then.