I want to revert changes made by a particular commit to a given file only.
Can I use git revert command for that?
Any other simple way to do it?
The cleanest way I've seen of doing this is described here
git show some_commit_sha1 -- some_file.c | git apply -R
Similar to VonC's response but using git show and git apply.
git show
git apply
2.1m questions
2.1m answers
60 comments
57.0k users