title: Git does not delete files created after a commit I reverted to
body: <p>I have a rails project and I did the following steps:</p>
  
  <ol>
  <li><p><code>git commit -m "Format gemfile"</code> and <code>git push</code> to make sure everything is clean. The id of this commit is b24d101</p></li>
  <li><p><code>git checkout -b newbranch</code></p></li>
  <li><p>While on the new branch I deleted a file, made changes to 2 other files and generated several other files.</p></li>
  <li><p><code>git status</code> I have 2 files modified, 1 file deleted and several files untracked. So far so good.</p></li>
  <li><p>I noticed a problem, so I moved back to the master branch via <code>git checkout master</code> and deleted the newbranch via <code>git branch -d newbranch</code>.</p></li>
  <li><p><code>git status</code> still shows that there are several untracked files.</p></li>
  <li><p>I decided to revert to my last commit.</p></li>
  <li><p><code>git reset --hard b24d101</code></p></li>
  <li><p><code>git status</code> now shows that no files are deleted or modified (and indeed I can confirm this after a manual check, the deleted file from step 3 is there, the edits on the 2 files from step 3 are gone). However I still have these several untracked files. I don't want them. Isn't git supposed to delete these files since they were created: a) on a new branch, which no longer exists and was not merged before deletion, and b) after the commit I reverted to?</p></li>
  </ol>
  
  <p>P.S. Am I suppose to <a href="https://stackoverflow.com/questions/61212/removing-untracked-files-from-your-git-working-copy">"clean"</a> these files manually?</p>