4

I just learned about git rerere as I'm preparing to rebase a long-lived branch on top of master.

What is git-rerere and how does it work?

I have merged master into my branch a few times already, but only enabled rerere afterwards.

Is there a way to 'seed' the rerere database with these already-existing merge commits? (so when I finally do the rebase, I can benefit from replaying the conflict resolutions in these older commits)

pkamb
  • 33,281
  • 23
  • 160
  • 191
Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233
  • 4
    See https://github.com/git/git/blob/master/contrib/rerere-train.sh - basically you turn `rerere` on, then re-perform the merge, grab the merge result from the existing merge, save it, discard the deliberately failed merge, and keep going. – torek Dec 04 '19 at 00:36
  • 2
    Or see [here](https://stackoverflow.com/questions/23857349/re-use-conflict-resolution-with-git/23861395#23861395). – jthill Dec 04 '19 at 00:46

0 Answers0