We are doing revert our code in different different ways.
The basic way of doing this using git revert command.
The git revert commit command is substantially similar to the command git cherry-pic commit with one important difference: it applies the inverse of the given commit. Thus, this command is used to introduce a new commit that reverses the effects of a given commit.
My Current master status
A => B => C => D => E
If we are reverting commit D
Then it will become
A => B => C => D => E => D”
Here D” is the commit reverse of D