There's more...

It's possible to revert more than one commit in a single revert, for example, git revert master~6..master~2 will revert the commits from the sixth commit from the bottom in the master to the third commit from the bottom in the master (both included).

It is also possible not to create a commit while reverting; passing the -n option to git revert will apply the needed patched, but only to the working tree and the staging area.

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.