Isolate conflict resolutions in their own commit

Viewed 29

I'll periodically rebase new commits from the upstream vendor's repo onto my own master branch. Sometimes there are conflicts. If I resolve them in the usual way the rebased commits on the master branch can end up differing from the source commits on the vendor branch.

I want to avoid this so while I'm resolving conflicts I'll also edit another entire copy of the repo (set to my original master) and attempt to anticipate the changes in the rebase. I'll then fashion those edits into another commit that is applied to the original master before re-doing the rebase. This commit essentially contains all the things necessary to resolve the conflicts that the rebase will bring in. If I do this right I'll end up with a clean rebase and all the rebased commits faithful duplicates of the originals. Sometimes this takes a few iterations.

Is there a more straightforward way to do this that doesn't require all the manual labor?

0 Answers
Related