* Moving a branch to a different node
@ 2010-06-06 21:01 Mike Solomon
2010-06-06 22:08 ` Taylor Hedberg
2010-06-06 22:19 ` Andreas Schwab
0 siblings, 2 replies; 3+ messages in thread
From: Mike Solomon @ 2010-06-06 21:01 UTC (permalink / raw)
To: git
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?
Thank you!
~Mike
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Moving a branch to a different node
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
1 sibling, 0 replies; 3+ messages in thread
From: Taylor Hedberg @ 2010-06-06 22:08 UTC (permalink / raw)
To: Mike Solomon; +Cc: git
I believe what you want is:
git rebase --onto master foo bar
On Sun, Jun 6, 2010 at 5:01 PM, Mike Solomon <mikesol@ufl.edu> wrote:
>
> 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?
>
> Thank you!
> ~Mike
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Moving a branch to a different node
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
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Schwab @ 2010-06-06 22:19 UTC (permalink / raw)
To: Mike Solomon; +Cc: git
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."
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-06 22:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).