git reset --hard 'xxxxx'
git clean -f -d
git push -f
$ git reset <previous label or sha1>
$ git commit -am "blabla" <--- optional
$ git push -f <remote-name> <branch-name>
git reset <hash> # Run this then merge, commit, and push
You can revert individual commits with:
git revert <commit_hash>
This will create a new commit which reverts the changes of the commit you specified. Note that it only reverts that specific commit, and not commits that come after that. If you want to revert a range of commits, you can do it like this:
git revert <oldest_commit_hash>..<latest_commit_hash>
It reverts all the commits after <oldest_commit_hash> up to and including <latest_commit_hash>. On some versions of git it also reverts the <oldest_commit_hash>, so double check if that commit gets reverted or not. You can always drop the latest revert commit (which reverts the oldest commit) with g reset --hard HEAD~.
To know the hash of the commit(s) you can use git log.
Look at the git-revert man page for more information about the git revert command. Also, look at this answer for more information about reverting commits.