git remote prune origin
Undo one or more commits in a next commit:
git revert HEAD~3..HEAD
Git revert <old-commit>..<new-commit>
Go back to a previous state and DELETE all commits that were made after that status:
git reset --hard <the-commit-to-be-reset-to>
Go back to the current REMOTE state and DELETE all commits that were made after that status, provided that the remote repository is origin, and that you're interested in master:
git fetch origin
git reset --hard origin/master