3

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.

Acorn
  • 24,970
  • 5
  • 40
  • 69
  • See [Reverting a git merge while allowing for the same merge later](https://stackoverflow.com/questions/57904970/reverting-a-git-merge-while-allowing-for-the-same-merge-later/57905240#57905240). – j6t Oct 05 '19 at 14:17

2 Answers2

1

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

Sasidaran
  • 58
  • 1
  • 7
0

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.

Acorn
  • 24,970
  • 5
  • 40
  • 69