I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous versio
This is a very simple step. Checkout file to the commit id we want, here one commit id before, and then just git commit amend and we are done.
# git checkout # git commit --amend
This is very handy. If we want to bring any file to any prior commit id at the top of commit, we can easily do.