What git-revert does is create a commit which undoes changes made in a given commit, creating a commit which is reverse (well, reciprocal) of a given commit. Therefore
git revert <SHA-1>
should and does work.
If you want to rewind back to a specified commit, and you can do this because this part of history was not yet published, you need to use git-reset, not git-revert:
git reset --hard <SHA-1>
(Note that --hard
would make you lose any non-committed changes in the working directory).
Additional Notes
By the way, perhaps it is not obvious, but everywhere where documentation says <commit>
or <commit-ish>
(or <object>
), you can put an SHA-1 identifier (full or shortened) of commit.