How to merge commits previously rejected/reverted?

Viewed 104

I have a branch A that was previously merged into dev and later reverted due to some issues.

After a long time, I want to merge again that branch A on dev, but it's not updating the dev branch now. Instead it shows that Already updated.

How do I merge the commits from A to dev?

I have also tried to pull dev branch locally and merge them on A. But it overwrites the changes on A.

I know there are some hacky ways like copy pasting the changes. But there are a lot of changes and I want to know the proper way to do this.

2 Answers

You will have to do a "git revert" of the revert commit you performed on the branch A and then merge to dev branch

You need to "revert the revert".

In other words, find the commit that reverted the original merge and revert that one.

However, in general you should avoid reverting a merge. See How to revert a faulty merge from the official docs for more details.

Related