2

So merge resolution is important when we have two branches A and B writing changes to the same file and we don't know what the appropriate end state F_Z should be, possibly F_A, F_B or some combination of the two. However if I'm doing a git rebase like

pick fixup fixup ... fixup

where the F_Z is already known and the intermediate commits are being deleted, why do I have to merge every conflicting commit? Is there a way to skip having to do this? I really just want to clean up my commit history and without affect F_Z.

2
  • If you have pick A followed by fixup B and fixup C, which of the three is a merge commit? Is this your pattern, or do you have multiple pickups/fixups in the same interactive rebase? Dec 10, 2015 at 18:59
  • I suppose B would have been a merge with merge conflicts that were manually resolved at the time B was committed/merged to this branch. My annoyance was that I've already handled the merge resolution, but rebase asks me to do it again, for every conflict in the rebase history, even though I already have a well defined end state. It sounds like this git rerere solves this use case however.
    – bhan
    Dec 11, 2015 at 17:49

1 Answer 1

1

this is solved by a pretty much unheard of function called git rerere

https://github.com/PackardChan/git-scm.com/blob/blog-revive/app/views/blog/posts/2010-03-08-rerere.markdown

use /usr/share/doc/git/contrib/rerere-train.sh to train rerere from your existing merge commit resolution

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.