git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Help breaking up a large merge.

From
David Brown <git@davidb.org>
Date
Sep 18, 2008, 15:21 UTC
Message-ID
<20080918152154.GA27019@linode.davidb.org>

Say we have a tree that we've been working on for a few months. An outside vendor has also been working on the same tree during this time, and we need to merge with their work.

The difficulty I'm having is that there are a lot of conflicts resulting from the merge (expected), and it would be nice to somehow be able to work on a smaller set of these conflicts at a time.

Some of the conflicts are caused by a single change in the other tree. This is easy to cherry-pick into my tree, resolve, and then test those changes independently.

But other conflicts are caused by groups of commits that are interleaved with others.

Ideally, I'd like to be able to divide this conflict resolution work up among a small group of people, have everybody work on part, test their part, and then I could bring all of the resolved versions together, test that, and make that the actual merge commit in our repo. I've had a few ideas, but none really seem to work all that well.

   - Do "git merge -s ours their-tree".  Then, in another branch try
     the merge, and resolve a group of files that go together.  Put
     these into the 'ours' tree and ammend these changes to the merge
     commit.  The problem here is that this misses all of the merges
     that would happen automatically.
   - "git branch -b tmp $(git merge-base our-head their-tree)", and
     then: "git checkout their-tree filenames" for a small group of
     conflicting files.  Commit this, then in my regular tree, cherry
     pick this change and resolve the conflict.  Then, when finally
     doing the merge with their tree, these files can be resolved by
     just using our version.  This still requires doing some tracking.
Any other ideas?

In the future, we're going to try and work more closely with the vendor, but we have to get to the point of having something common to start that.

Thanks, David

Next: Santi Béjar
Message 1 of 6 in “Help breaking up a large merge.”
  1. David BrownSep 18, 2008
  2. Santi BéjarSep 18, 2008
  3. David BrownSep 18, 2008
  4. Johannes SixtSep 18, 2008
  5. Avery PennarunSep 18, 2008
  6. David BrownSep 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.