xxxxxxxxxx
$ git reset --hard HEAD (going back to HEAD)
$ git reset --hard HEAD^ (going back to the commit before HEAD)
$ git reset --hard HEAD~1 (equivalent to "^")
$ git reset --hard HEAD~2 (going back two commits before HEAD)
xxxxxxxxxx
git reset --hard f414f31
git reset --soft HEAD@{1}
git commit -m "Reverting to the state of the project at f414f31"
xxxxxxxxxx
#move head back to the specified commit but retain changes made since
#allows to force push to remote if commits were pushed in error
#but work can continue without starting over
git reset abc1234
#move the head back and remove all trace of changes since specified commit
git rset abc1234 --hard
#after either you can force push to the branch so the remote is aware of the rollback
git push -f