Here we need to use the Git command:
git revert
This command can revert any command just by adding the commit ID.