title: Why do I get untracked files after a git pull (files were moved on the remote)
body: <p>Running a <code>git pull</code> created some untracked files in my local copy.  The files were moved on the remote, but the pull didn't remove the files in my working directory.  I've spent quite a bit of time researching this, but can't find any similar cases.  Is this intended behavior, am I missing something, or both?</p>
  
  <h2>Background</h2>
  
  <p>I made a patch and sent it to the devs of an open source project, but then I wanted to remove my local commit and <code>git pull</code> the "official" patch once it got committed on the remote.  So I did a bunch of "stuff" to reset to the previous official HEAD.  "Stuff" means things like <code>git checkout -- &lt;file&gt;</code>, <code>git reset HEAD^</code>, and other commands I cannot remember as I'm new to git and I'm trying to research best practices.</p>
  
  <p>At any rate, after I finally "undid" my commit and did a <code>git pull</code>, I got 66 commits worth of changes, including my patch, and everything looked great.  But then <code>git status</code> showed that two files were untracked.  I did a <code>gitk &lt;untracked_file1&gt;</code> and I saw that about 20 commits back, the file was moved to another directory.  The file now exists in the new location, but instead of deleting the old file, it shows up as untracked.</p>
  
  <p>I tried doing a hard reset by <a href="https://stackoverflow.com/a/8888015/1188035">following these instructions</a>, but the files remain untracked.  I can do a <code>git clean -f</code> to clear them out, but I'm wondering why the files aren't automatically removed.</p>