Reputation: 5452
I created a pr and merged it to master
, but it had to be rolled back and the merged branch was recovered. Now I fixed the error and I want to make the merge again, but now master
branch is overriding the changes in the merging branch, which means that all changes are lost with the merge. It seems git is taking master as ahead of the merging branch.
How can I instruct git to use changes in the merging branch as the ones to keep?
Upvotes: 0
Views: 106
Reputation: 19035
I am assuming that the fixes were made to the same merging branch that was earlier merged into master
. If that is the case, you must first revert the commit that rolled back that merge (i.e. revert the revert), then merge the merging branch back in. The first action undoes the rollback, whereas the second action merges in the fixes you made since that original merge.
Upvotes: 1