dlsso
dlsso

Reputation: 8111

How to cleanly merge branch containing revert (branch containing revert sees revert as new changes)

I have a branch containing a revert that I would like to move to master.

However, the revert seems to be seen as new changes and applies them to master when it is merged. This is overwriting a lot of things in master that should be untouched.

I would like to merge to master as if the reverted commit never happened. Is there a way to do this?

If not, what do I need to do to the branch containing the revert in order to get it to a state where I can merge without overwriting the revert contents?

Upvotes: 2

Views: 69

Answers (1)

David Deutsch
David Deutsch

Reputation: 19035

On your branch, simply revert the revert commit, i.e.

git revert <sha of revert commit>

This will "undo the undoing," if you will.

Upvotes: 1

Related Questions