title: How to undo git checkout file for uncommitted changes?
body: <p>So I did a GIT status and noticed a bunch of files that were staged that should have been ignored by GIT ignore, such as .gitignore, .htaccess, and settings files for my Drupal site. </p>
  
  <p>I mistakenly used <code>git checkout &lt;file&gt;</code> instead of <code>git rm &lt;file&gt;</code> to remove them from the staging area. While it looked like it worked, I broke the website. I think I now understand that <code>git checkout</code> reverts any changes I've made to those files, correct? The changes weren't committed because they weren't supposed to be tracked in the first place. </p>
  
  <p>How is <code>git checkout &lt;file&gt;</code> supposed to be used (what is the opposite of it) and ow can I undo the undo or where do I go from here?</p>