Case 1: Assuming you are sitting on that commit, then this command will nuke the last commit
git reset --hard HEAD~1
Case 2: Take a look at the output of git log, find the commit id of the commit you want to delete, and then do this:
git reset --hard <sha1-commit-id>
Case 3: If you already pushed it, then you need to do a force push to get rid of it.
git push origin HEAD --force
For more commands like this please go through the following tutorial that will help you understand the git