1 year ago

#356794

test-img

user60108

GIT: send merge request reverting a revert

I have worked on a feature-branch, and I have sent a merge request with the following commits

feature-branch: A - B

Someone accepted it by mistake, without reviewing it and it was merged in master.

That same person applied a revert commits of the feature commits on master.

master: A - B- C (revert b) - D (revert a)

I kept working and added a new commit with some minor details in feature-branch

feature-branch: A - B - E

How do I send a merge request with all the changes? including those that were removed in the revert

I have tried following this but it didn't work for me

In feature branch

$ git cherry-pick -x C
$ git cherry-pick -x D

The result:

 feature-branch: A - B - E - F (revert b) - G (revert a)

Then I applied

$ git revert G
$ git revert F

The result:

 feature-branch: A - B - E - F (revert b) - G (revert a) - H (revert g) - I (revert f)

Now, when resubmitting merge request from my feature-branch, I only see the changes made in the last commit as difference to master. But I see all "reverts" commits in the commits detail.

git

git-merge

git-revert

0 Answers

Your Answer

Accepted video resources