All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Bill Lear <rael@zopyra.com>
Cc: git@vger.kernel.org
Subject: Re: How to revert one of multiple merges
Date: Mon, 19 Oct 2009 17:19:35 +0200	[thread overview]
Message-ID: <4ADC8387.9010808@drmicha.warpmail.net> (raw)
In-Reply-To: <19162.32265.738503.382638@lisa.zopyra.com>

Bill Lear venit, vidit, dixit 18.10.2009 04:31:
> Branch A, B, C each have 20 commits, 0-19.
> 
> Branch v1.0.0 created, then merge of A, B, C performed.
> 
> After testing, we realize that the branch B is not ready for
> production release and we'd like to remove it from branch
> v1.0.0.
> 
> If I do
> 
> % git merge A B C
> 
> I get a single commit:
> 
> % git log -p
> 
> commit 1644a0b98c01869aa83e59aa41374c22098c47b6
> [...]
> Date:   Fri Oct 16 09:52:32 2009 -0500
> 
>     Merge branches 'A', 'B' and 'C' into v1.0.0
> 
> [20 x 3 commits]
> 
> If I do
> 
> % git merge A
> % git merge B
> % git merge C
> 
> Then:
> 
> % git log -p
> 
> commit 8946edd381384d0882221c87b5b3b7bf47127d70
> [...]
> Date:   Sat Oct 17 21:28:36 2009 -0500
> 
>     Merge branch 'B' into v1.0.0
> 
> commit 076ed422443e3684e564f7cae2b92e4538088ae6
> [...]
> Date:   Sat Oct 17 21:28:35 2009 -0500
> 
>     Merge branch 'A' into v1.0.0
> 
> but no "Merge branch 'C' into v1.0.0".

Do you get any commits after the merge of B? If yes, then v1.0.0 got
fast-forwarded (you can avoid that using --no-ff). If no, C was
contained in v1.0.0 already.

In both cases, it's not clear how C could have been "ready" when B was not.

> And so, I'm faced with git rebase -i posing some unanswerable questions
> to our release manager.  She cannot easily remove B from the merge after
> doint either merge A B C, or merge A, merge B, merge C.

The way you described the situation there are no commits after the
merges. So, why not reset to before the merge and do a "git merge A C"?

Michael

  reply	other threads:[~2009-10-19 15:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18  2:31 How to revert one of multiple merges Bill Lear
2009-10-19 15:19 ` Michael J Gruber [this message]
2009-10-19 18:13   ` Bill Lear
2009-10-19 19:36     ` Michael J Gruber

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=4ADC8387.9010808@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=rael@zopyra.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.