I encountered a similar problem today. git status
wasn't listing the files which checkout was complaining about. I did a:
git checkout -- path/to/file
And that undoes any changes to the file.
An even easier way to undo all unstaged changes on current working directory [1]:
git checkout -- .
[1] - Be warned - you will lose any other unstaged changes you were working on (if any). If you don't know what you are doing, then keep a backup of the files you were working on :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…