Imagine the following scenario:
Code that should not have been merged with the integration branch should be returned. However, you cannot just reset, since other commits have occurred since that moment. Alternatively, you can reapply this commit later.
Easy to use git revertfor back fixation. However, what happens when we want to commit this change (for example, from a feature branch)? Are you just re-merging the branch? Will this work, since technically the code has already been merged?
What do you do when you are finally ready to accept this merger?
source
share