title: Git fails to revert: Found a swap file "COMMIT_EDITMSG.swp"
body: <p>I'm using git inside Visual Studio 2013. I'm trying to revert to a specific commit without losing the history leading from that commit to the current commit. In other words, I want git to generate a new commit that has the same snapshot as the specified commit. This is what I've done:</p>
  
  <pre><code>git revert &lt;commit&gt;
  </code></pre>
  
  <p>where <code>&lt;commit&gt;</code> is the id of the commit I intend reverting to.</p>
  
  <p>Executing the above (in Visual Studio's git command prompt) resulted in the following error:</p>
  
  <blockquote>
    <p>Found a swap file by the name ".git\.COMMIT_EDITMSG.swp" while opening file ".git\.COMMIT_EDITMSG.swp" NEWER than swap file!</p>
  </blockquote>
  
  <p>and that</p>
  
  <blockquote>
    <p>Swap file ".git\.COMMIT_EDITMSG.swp" already exists!</p>
  </blockquote>
  
  <p>I can't figure out what it means. Did I do it wrong? How am I supposed to revert to a specific commit?</p>