git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: David Brown <git@davidb.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Help breaking up a large merge.
Date: Thu, 18 Sep 2008 18:41:34 +0200	[thread overview]
Message-ID: <48D284BE.5040107@viscovery.net> (raw)
In-Reply-To: <20080918152154.GA27019@linode.davidb.org>

David Brown schrieb:
> 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.

In a similar situation I was thinking about this approach:

1. Do the merge.
2. Resolve conflicts in an area that can be tested in isolation.
3. Undo all other changes that the merge brought in.
4. Commit.
5. Install a graft that removes the second parent of the merge commit.
6. Rinse and repeat.
7. Finally, remove the grafts, and perhaps collapse the merge commits.

I didn't test this, yet.

Hmm, thinking a bit more about this, 1 and 5 can probably be replaced by a
mere 'git merge --squash'.

-- Hannes

  parent reply	other threads:[~2008-09-18 16:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18 15:21 Help breaking up a large merge David Brown
2008-09-18 15:55 ` Santi Béjar
2008-09-18 16:25   ` David Brown
2008-09-18 16:41 ` Johannes Sixt [this message]
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=48D284BE.5040107@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=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).