Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.