A method I have used in the past was to sort of replay the time-axis and pretending we had merged along the way.
Basically, we had this:
*---*---*---*---*---*---*---*---*---*---*---*---*---*---* <-- master
/
/
*---*---A
\
\
*---*---*---*---*---*---*---*---*---*---*---*---*---*---* <-- feature
We first created a new branch from the original branch point (A above), then we picked select commits from master and the feature branch and merged into the new branch, one pair at a time.
This still gave us merge conflicts, but they were smaller and easier to cope with.
The result was something like this:
*---*---*---*---*---*---*---*---*---*---*---*---*---*---*-----M <-- master
/ \ \ \ /
/ \ \ \ /
*---*---A-------------M-------------------M-------------------M-------M <-- (temp)
\ / / / /
\ / / / /
*---*---*---*---*---*---*---*---*---*---*---*---*---*---* <-- (feature)
All the M
's above were the merges that in some way had a merge conflict, big or small.
I do think we had several more of them though like 7-8 merges in total, but we were able to pick some good commits from both master and feature by using the history and picking some stable points after refactoring and additions of new features, and then merge those together.