title: How to undelete files in Git?
body: <p>Testing with the <code>rm</code> command in Git I ended up removing all my files from my drive.</p>
  
  <p>The command that caused this to happen is the following:</p>
  
  <pre><code>git rm . -r
  </code></pre>
  
  <p>Now my file system contains only the directories while all the files that I have previously added to Git are missing.</p>
  
  <p>How can I restore all the files from the Git repository?</p>