* Changes based on a branch not yet merged back to master
[not found] <1396956140.85747.YahooMailNeo@web121901.mail.ne1.yahoo.com>
@ 2014-04-08 18:22 ` K. Kwan
2014-04-08 19:53 ` Jeff King
0 siblings, 1 reply; 2+ messages in thread
From: K. Kwan @ 2014-04-08 18:22 UTC (permalink / raw)
To: git@vger.kernel.org
I have a feature branch (A) containing changes awaiting code review. I now need to begin work on new feature (B) that is dependent on new files and changes made in branch (A).
Is there "proper" way to rebase just the changes made in branch (B) back onto master (M) branch resulting from the merge of branch (A)
My tree would look like this:
- x - x - x (master)
\ x - x (A) x - x (B)
But after merge of branch (A), I would like it to look like this:
- x - x - x ---- x (master)
\ / \
x - x (A) x - x (B)
Perhaps this?
$ git checkout master
$ git pull origin master
$ git merge A
$ git rebase --onto master A B
Regards.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Changes based on a branch not yet merged back to master
2014-04-08 18:22 ` Changes based on a branch not yet merged back to master K. Kwan
@ 2014-04-08 19:53 ` Jeff King
0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2014-04-08 19:53 UTC (permalink / raw)
To: K. Kwan; +Cc: git@vger.kernel.org
On Tue, Apr 08, 2014 at 11:22:44AM -0700, K. Kwan wrote:
> My tree would look like this:
>
> - x - x - x (master)
>
> \ x - x (A) x - x (B)
>
>
> But after merge of branch (A), I would like it to look like this:
>
> - x - x - x ---- x (master)
> \ / \
> x - x (A) x - x (B)
>
>
> Perhaps this?
>
> $ git checkout master
> $ git pull origin master
> $ git merge A
> $ git rebase --onto master A B
Yes, that should work. I think you could even just do:
git rebase master B
since after the merge, all of A is contained in master (and so will be
omitted from the rebased commits).
-Peff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-08 19:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1396956140.85747.YahooMailNeo@web121901.mail.ne1.yahoo.com>
2014-04-08 18:22 ` Changes based on a branch not yet merged back to master K. Kwan
2014-04-08 19:53 ` Jeff King
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).