mhagger / git-imerge

Incremental merge for git
GNU General Public License v2.0
2.7k stars 126 forks source link

Make it easy to amend a completed imerge #163

Open dabrahams opened 4 years ago

dabrahams commented 4 years ago

imerge is awesome; thank you for this wonderful tool!

I have a use-case that's not necessarily well-served, at least by easily findable documentation.

I've been on several teams that had a rotating responsibility to resolve conflicts when an automatic merge bot fails. The person doing this job is never an expert in all areas of the codebase, so their merge resolution may result in a broken result even though it looks reasonable, textually. I'd like to be able to create the imerge grid, then share it with someone, let them help me amend any of the commits in the graph (including merges that were not detected as conflicts), and update the imerge accordingly. I'd like there to be a record of which merges I manually intervened in, and be able to compare my resolution to the original conflicted states of the files. If this kind of workflow is supported, it's hard to find documentation about how to do it.

mhagger commented 4 years ago

This workflow is indeed not well documented. What would work today (obviously not very user-friendly):

It would also be possible for your colleague to push branch refs/heads/imerge/$NAME and for you to fetch that branch and run git imerge record or git imerge continue. (The branch could even be pushed under a different name, but it has to be named refs/heads/imerge/$NAME by the time you run record/continue.)

I haven't tested this but I think it would work, modulo typos on my part. It would be great to make it easier!