git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Brown <git@davidb.org>
To: Git Mailing List <git@vger.kernel.org>
Subject: Help breaking up a large merge.
Date: Thu, 18 Sep 2008 08:21:55 -0700	[thread overview]
Message-ID: <20080918152154.GA27019@linode.davidb.org> (raw)

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

             reply	other threads:[~2008-09-18 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 15:21 David Brown [this message]
2008-09-18 15:55 ` Help breaking up a large merge Santi Béjar
2008-09-18 16:25   ` David Brown
2008-09-18 16:41 ` Johannes Sixt
2008-09-18 17:40 ` Avery Pennarun
2008-09-18 17:47   ` David Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080918152154.GA27019@linode.davidb.org \
    --to=git@davidb.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).