最佳答案
When I do a git status, I see files like this:
modified: dir/A/file.txt
modified: dir/B/file.txt
modified: dir/C/file.txt
modified: dir/D/file.txt
What I want to do is to discard changes to all files EXCEPT for dir/C/file.txt
I want to do something like this:
git checkout -- dir/!C/file.txt