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
1.4m articles
1.4m replys
5 comments
57.0k users