I was working on a git branch and was ready to commit my changes, so I made a commit with a useful commit message. I then absentmindedly made minor changes to the code that
None of these answers helped me because I still had untracked files even after reset and stash. I had to do:
git reset --hard HEAD git clean -d -f