Say you are developing a new feature and you realize after few commits that you went off to a way different route that you suppose to and you need to back it up few commits and start over... this definitely would be a cleaner way vs trying to remove what was done manually. How to do it though?
Check out what you want and get rid of all that code...
$ git reset --hard 0d3b7ac32
Then you would push it up
$ git push origin +master
Pretty simple once you know it.