Can I tell Git to re-use the conflict resolution from an existing merge commit? I had rerere disabled at the time of commit. The new merge commit contains a few additional commits on the "ours" side of the merge (but they should not introduce new conflicts as they modified a different set of files).
For instance, take the following DAG:
m [master] Add new stuff
*
| o [old-master] Merge branch A (conflicts)
|/a [branch A]
n *
* *
*/
*
Now, what I want to do is to bring commits m
and m^
into the branch old-master
(and later make that the new master). I don't want to simply merge master
into old-master
, since it will create a new merge commit (albeit without conflicts). I want to recreate commit o
with m
and a
as parents.
The new DAG should look like:
p [old-master] Merge branch A (same conflict resolution as old commit o)
/|
m | [master] Add new stuff
* |
| a [branch A]
n *
* *
*/
*
I don't mind using rerere, if I can tell it afterwards to record the resolution of the existing merge commit (o
).
The simplest way to implement what you're asking for is probably to retroactively turn rerere on:
and now that rerere has seen what you did with those conflicts,