title: Git commit messages lost by vi
body: <p>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 (<code>:Wq</code>, say, instead of <code>:wq</code>), when you correctly close out the commit message in vim with <code>:wq</code> or <code>:x</code>, you get this:</p>
  
  <pre><code>error: There was a problem with the editor 'vi'.
  Please supply the message using either -m or -F option.
  </code></pre>
  
  <p>Normally, a wrong command like <code>:W</code> is no problem—vim just ignores it and you can keep on working with the file and save it, but in git commit messages as soon as I mistype, I have irrevocably lost the commit message.</p>
  
  <p>What's going on here, and how do I fix it? (Using git 1.9.1 via homebrew, vim 7.3 as packaged with OS X 10.9)</p>