“git revert” can help in reverting one or multiple commits. The command helps in the creation of a new commit that cancels out changes brought in the previous commits. The following command can help in reverting the two previous commits.
“git revert HEAD~2.HEAD”