title: How can I restore only the modified files on a git checkout?
body: <p>Say I have a directory containing hundreds of files. I modify several of them, but afterwards I realize my changes are bad. If I do:</p>
  
  <pre><code>git checkout whole_folder
  </code></pre>
  
  <p>Then everything gets checked out again, and I have to recompile everything. Is there a way to make checkout affect only modified files, or do I need to run <code>checkout</code> on each file separately?</p>