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?
If you'd like to reset the changes on a file from your last commit, this is what I'm usually using. I think this is the simplest solution.
Please notice that the file will be added to the staging area.
git checkout --
Hope it helps :)