A different scenario is when you want to revert the effects of a certain commit - without deleting any commits that came afterwards.
This is a case for the "git revert" command. Interestingly, the command doesn't delete anything; it creates a new commit that introduces changes which revert the effects of the specified commit. Our post explains the details of how to go about reverting commits.
Delete or change specific commits
Another use case might be to delete a commit "in the middle" of your history, without resetting your whole project to a previous revision.
In that case, we'll have to bring out the big guns: Git's "Interactive Rebase" tool is what we need here. Please note that this is not only the most powerful, but also the most dangerous of the three commands listed here. This is because it allows you to change your commit history quite drastically - which is a dangerous process.
In case you are using the Tower Git client, not only "reset" and "revert" are easily accessible. Tower also allows you to access advanced tools like "interactive rebase" very easily, for example to delete a commit (and if you made a mistake, you can undo it simply by hitting CMD+Z!).