Take the 2-minute tour ×

When I make a new Git commit (git commit) and it enters Vim, sometimes it happens that I make a small typo when I want to save the commit-message-file. E.g. I type :Wq instead of the usual :wq.

Vim reports an error then. Then, when I correctly save the file and quit Vim, Git says that Vim reported an error and it aborts the commit.

How can I avoid that? I.e. how can I reset the Vim error state so that Git doesn't think that Vim had an error?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Are you running OSX? maybe that will help. It seems you have to call vim which its full path. Just add it to your config git config --global core.editor /usr/bin/vim

share|improve this answer

Your Answer


