title: How to undo git rm -rf dirname without a first commit?
body: <p>I did:</p>
  
  <pre><code>git init
  git add .
  git rm -rf dirname
  </code></pre>
  
  <p>Looking at other answsers, <code>git reset --hard HEAD</code>, <code>git checkout -f</code> and <code>git reflog</code> did not work, apparently because there is no HEAD to go back to, nor a commit to get the files back from.</p>
  
  <p>Is there a way to get the files back?</p>