Note that this is like reset but for public branches.

In order revert to a previous commit in history 803cda1:

git checkout -f 803cda1 -- .

Reset from HEAD the changes you do not want to revert. Commit:

git commit -m "Revert changes to commit 803cda1"