When I commit to git, I generally enter my message in Vi and then type
:wq but just occasionally I miss and type
:Wq which is clearly invalid. The problem is that when I do this, Vi exits with return code 1. Git sees this and thinks I aborted the commit and so I lose my commit message.
What I want is to still be able to abort a commit with
:cq - so changing git to ignore the error is not ideal (although if no-one knows of anything else then I'd go for that) but to be able to still commit correctly when I've typed