Create new commits which reverse the effect of earlier ones.

# To revert the most recent commit:
git revert @

# To revert the 5th last commit:
git revert HEAD~<4>

# To revert multiple commits:
git revert <master~5..master~2>

# To don't create new commits, just change the working tree:
git revert -n <0c01a9..9a1743>