how to revert commit in git

Shell
git checkout <commit hash>git revert <commit hash># This will detach your HEAD, that is, leave you with no branch checked out:
git checkout 0d1d7fc32
Source

Also in Shell: