title: Recovering lost files after git pull
body: <p>I added some old assignments to my GitHub. I added one assignment from my local repo to the remote successfully, but made the mistake of adding a <code>README.md</code> to it on my web browser. This caused me to not be able to push any commits locally anymore because</p>
  <pre><code>Updates were rejected because the remote contains work that you do
  not have locally. This is usually caused by another repository pushing
  to the same ref. You may want to first integrate the remote changes
  (e.g., 'git pull ...') before pushing again.
  </code></pre>
  <p>So I did a <code>git pull origin master</code> command to get that <code>README.md</code> file from GitHub, but I believe when it merged with my local branch, it deleted all of my local files that I had not pushed yet. Now all of my other assignments are just empty folders. How do I get these files back? And what would have been the better alternative to pulling from the remote repository?</p>