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)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…