I'm sure this is a duplicate, but whenever I google, I can't find an answer. Let's say I do a git status
and 3 files are modified. It doesn't matter if they're staged, unstaged, or whatever. I want to reset one of those files back to their HEAD state, effectively doing a git reset --hard
, but only for that one file. How do I do that? I'm looking for a universal command, not a "if it's staged, do x, if it's unstaged, do y." Does such a command exist?
Asked
Active
Viewed 697 times
0

Daniel Kaplan
- 62,768
- 50
- 234
- 356
-
3see https://stackoverflow.com/q/7147270/1256452 – torek Apr 11 '19 at 20:50