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?