To revert a GitHub repo to a previous commit
git revert HEAD
If your last commit was a merge, a little more love is needed:
git revert -m 1 HEAD
To revert a Github repo to an old commit:
git log #look up the <old-commit-id>
git reset --hard <old-commit-id>
git push origin HEAD --force
other tips at: