This article has an excellent explanation as to how to go about various scenarios (where a commit has been done as well as the push OR just a commit, before the push):
From the article, the easiest command I saw to revert a previous commit by its commit id, was:
git revert dd61ab32