Travel pointer
If what you are actually trying to do is move the branch pointer for the master after a complex reboot or merge in a separate branch, you can do this in various ways. For example, to forcibly move some intermediate branch so that it becomes your new main branch, you can do one of the following:
There are also ways in which you can execute various plumbing commands, but this does not mean that this is an exhaustive treatise. That should be enough for you to point in the right direction.
Undo commit
As other posts and comments have been correctly noted, if all you want to do is to cancel targeted commits from the wizard, you can use git -revert (1). Please note that this leaves both initial commits and reverses in your story; this is usually what you want.
Also note that git-revert can cause conflicts or unwanted changes that you will have to manually resolve, especially if the commits you return are small, atomic changes. Think of git-revert as the reverse patch (which it is mostly under the hood), and you can see where potential conflicts might arise.
Your mileage will certainly vary.
source share