title: How to fix "corrupted" interactive rebase?
body: <p>I managed to create a little mess in my local git repository. I was trying to fix a broken commit by using the <a href="https://stackoverflow.com/questions/1186535/how-to-modify-a-specified-commit">following instructions</a>. Before running the "git commit --amend" (and after the git rebase --interactive) I decided that my changes were incorrect and so I executed "git reset HEAD --hard". Not a good idea, I tell you.</p>
  
  <p>Now the interactive rebase seems to be "stuck". Git shows the current branch as (|REBASE-m). Every command (cd .., ls, git rebase...) inside my repository gives the following error:</p>
  
  <blockquote>
    <p>cat: .git/rebase-merge/head-name: No such file or directory</p>
  </blockquote>
  
  <p>Here's how git rebase --abort looks like:</p>
  
  <pre><code>$ git rebase --abort
  cat: c:/_work/project/src/git/.git/rebase-merge/quiet: No such file or directory
  cat: c:/_work/project/src/git/.git/rebase-merge/head-name: No such file or directory
  cat: c:/_work/project/src/git/.git/rebase-merge/orig-head: No such file or directory
  HEAD is now at 4c737fb Revert "Modified file names"
  rm: cannot remove `c:/_work/project/src/git/.git/rebase-merge/done': Permission denied
  rm: cannot remove directory `c:/_work/project/src/git/.git/rebase-merge': Directory
  not empty
  cat: .git/rebase-merge/head-name: No such file or directory
  </code></pre>
  
  <p>Here's the result of git rebase --continue:</p>
  
  <pre><code>$ git rebase --continue
  cat: c:/_work/project/src/git/.git/rebase-merge/prev_head: No such file or directory
  cat: c:/_work/project/src/git/.git/rebase-merge/end: No such file or directory
  cat: c:/_work/project/src/git/.git/rebase-merge/msgnum: No such file or directory
  cat: c:/_work/project/src/git/.git/rebase-merge/onto: No such file or directory
  cat: c:/_work/project/src/git/.git/rebase-merge/quiet: No such file or directory
  prev_head must be defined
  cat: .git/rebase-merge/head-name: No such file or directory
  </code></pre>
  
  <p>Any ideas? I would like to reset the situation back to the state it was before I started my well-thought rebase operation.</p>
  
  <p>Here's how git log --oneline shows the situation:</p>
  
  <pre><code>4c737fb Revert "Modified file names"
  247ac02 Modified file names
  33141e6 Message modifications
  10a4a04 Modified db script
  </code></pre>
  
  <p>And this is fine. </p>
  
  <p>I'm using msysgit v1.7.0.2.</p>