git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Mike Solomon <mikesol@UFL.EDU>
Cc: <git@vger.kernel.org>
Subject: Re: Moving a branch to a different node
Date: Mon, 07 Jun 2010 00:19:40 +0200	[thread overview]
Message-ID: <m2hblfregz.fsf@igel.home> (raw)
In-Reply-To: <C831D94B.1D9DF%mikesol@ufl.edu> (Mike Solomon's message of "Sun, 06 Jun 2010 23:01:31 +0200")

Mike Solomon <mikesol@UFL.EDU> writes:

> Hey git users,
>     I am working on a project where I proceeded by the following steps:
>
> starting from master...
> 1) create branch foo
> 2) work in foo, make some commits, then a patch named Foo
> 3) create a branch bar while in foo
> 4) work in bar, make some commits, then a patch named Bar
>
> git show-branch gives me
>
> ! [master] Hello
>  * [foo] Foo
>   ! [bar] Bar
>
> I would like to make bar split off of master instead of foo so that I can
> format a patch that can be applied to master (Bar) without having to first
> apply Foo.  Is there a way to do that?

IIUC you want to rebase the commits in bar that are not in foo onto
master.

$ git rebase --onto master foo bar

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

      parent reply	other threads:[~2010-06-06 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-06 21:01 Moving a branch to a different node Mike Solomon
2010-06-06 22:08 ` Taylor Hedberg
2010-06-06 22:19 ` Andreas Schwab [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=m2hblfregz.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=git@vger.kernel.org \
    --cc=mikesol@UFL.EDU \
    /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).