title: How do I find and restore a deleted file in a Git repository?
body: <p>Say I'm in a Git repository. I delete a file and commit that change. I continue working and make some more commits. Then, I discover that I need to restore that file after deleting it.</p>
  <p>I know I can checkout a file using <code>git checkout &lt;commit&gt; -- filename.txt</code>, but I don't know when that file was deleted.</p>
  <ol>
  <li>How do I find the commit that deleted a given filename?</li>
  <li>How do I restore that file back into my working copy?</li>
  </ol>