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?
See Question&Answers more detail:osI 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?
See Question&Answers more detail:osThe 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
.