I have two branches (let's call them A and B).
A is my regular development branch and B is a long-running feature branch.
A is routinely merged into B in order to keep it up-to-date and one day B will be merged into A, but we are not at that point yet.
A week or so ago a developer accidentally merged B into A and then immediately un-did the merge by running git revert.
Since that time, A has had numerous changes include having other feature branches merged into it.
Today, I attempted to do a merge of A into B as I do on a somewhat regular basis, but now I am having problems.
The merge is removing a number of files from B that were added in B (presumably because they were removed from A when git revert was run) and adding a number of files that were removed from B (presumably because they were added by the git revert).
It's also un-doing a lot of changes that should be in B.
My question is is there any way to cleanly fix this?
I'm open to history re-write as we have a small team and we could coordinate this.
I tried resetting A back to the point before the bad merge was done and cherry-picking the changes we've made to it since then, but since there have been a number of feature branch merges it's been difficult (the feature branches contain the bad merge commits and revert).