title: I've just deleted one week of work! How to undo git rm -r --cached?
body: <p>I commited a wrong file, so I wanted to clean it up, but accidentally I overwrote all my files in the directory with last files committed to git.</p>
  
  <p>Help please!</p>
  
  <p>What I did:</p>
  
  <pre><code>git add fileIdidnotwanttoadd
  git rm -r --cached .
  git reset --hard HEAD
  </code></pre>
  
  <p>result: All my fixes are gone! I fixed 3 very hard bugs and it's all gone!</p>
  
  <hr>
  
  <h3>Edit:</h3> 
  
  <p>Thank you all. I used most of your suggestions, still had to redo a few things, but all is restored now. No more perfectionism, I learned my lesson!</p>