git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Ryan Leigh <ryanl.pi@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Push merges?
Date: Wed, 26 Mar 2008 23:09:35 -0400	[thread overview]
Message-ID: <20080327030935.GA4974@coredump.intra.peff.net> (raw)
In-Reply-To: <ba5eca00803261452r4b5a7b6bi600c30e79b945477@mail.gmail.com>

On Wed, Mar 26, 2008 at 02:52:06PM -0700, Ryan Leigh wrote:

> I've been getting to know git and I've stumbled across a "problem" and
> I haven't yet been able to find a solution. For example, say I have a
> branch "base" and two branches of that "foo" and "bar". I make some
> change in "base", commit it, and now I would like to have it in both
> "foo" and "bar". Is there a command that rather than get another
> branch and merge with the current branch will instead take the current
> branch and apply a merge on other branches? I've done google searches

No, there isn't such a command. Merges must be done one at a time
because they use the index and working tree to report conflicts.

So what you are asking for is the moral equivalent of:

  for i in foo bar; do
    git checkout $i && git merge master
  done

and you could do it that way, except that the 'merge' step may fail with
conflicts that need to be fixed up by hand.

-Peff

      reply	other threads:[~2008-03-27  3:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-26 21:52 Push merges? Ryan Leigh
2008-03-27  3:09 ` Jeff King [this message]

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=20080327030935.GA4974@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=ryanl.pi@gmail.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 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).