title: Is there a way to remove all ignored files from a local git working tree?
body: <p>Yesterday I spent several hours debugging a problem with my git repo that wasn't fixed by <code>git reset HEAD --hard</code> because the files causing the problem were ignored by <code>.gitignore</code>.  Is there a way to "flush" or "clean" a git repo of all files that are being ignored, so that only the files tracked by git are present?</p>
  
  <p>I finally fixed my problem by deleting the repo and cloning it from github again, but in the future, I would like to immediately remove all potentially problematic files (those that are being ignored).</p>