gitgit-mergegit-rerere

How can I teach `git-rerere` about the resolutions in an existing merge commit, with the least manual intervention


git-rerere is the exact solution to a problem I have ... except that the merges that need to be "learnt" have already been performed and are non-trivial to repeat.

How can I "teach" rerere about those commits with the minimum manual intervention.

Supposing that existing, but conflicting, branches A and B were merged together to form commit C with resolved conflicts. Then I was hoping to do:

But the reset step doesn't work :(

EDIT:

Manually "resetting" the files, by checking out C before hand and copying over the relevant files works but is quite slow and tedious due to the large and complex nature of the repositor.

(lots of projects in separate folders, each with their own node_modules/packages folders that will tank the copy time, unless I target specific folders :( )

I'm hoping for something automated. #optimism


Solution

  • The contrib script rerere-train.sh is for this exact purpose