git status shows modifications, git checkout — doesn’t remove them

I was having this problem on Windows but wasn’t prepared to look into the ramifications of using config --global core.autocrlf false I also wasn’t prepared to abandon other private branches and goodies in my stash and start with a fresh clone. I just need to get something done. Now.

This worked for me, on the idea that you let git rewrite your working directory completely:

git rm --cached -r .
git reset --hard

(Note that running just git reset --hard wasn’t good enough nor was a plain rm on the files before the reset as are suggested in the comments to the original question)

Leave a Comment