git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Rebasing part of a branch
@ 2006-11-02 10:45 Andy Parkins
  2006-11-02 11:15 ` Jakub Narebski
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Parkins @ 2006-11-02 10:45 UTC (permalink / raw)
  To: git

Hello,

Is there a way to rebase part of a branch?  For example

                        H---I---J topicB
                       /
              E---F---G  topicA
             /
A---B---C---D  master

And I want:

             H---I---J  topicB
            /
            | E---F---G  topicA
            |/
A---B---C---D  master

Of course,
 
 git-checkout topicB
 git-rebase master

Doesn't work, because the common ancestor is D, which is master, and there is 
nothing to do.

Of course I can cherry-pick, but is there something like

 git-rebase --limit topicA master

Or some git-magic I can work?


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Rebasing part of a branch
  2006-11-02 10:45 Rebasing part of a branch Andy Parkins
@ 2006-11-02 11:15 ` Jakub Narebski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Narebski @ 2006-11-02 11:15 UTC (permalink / raw)
  To: git

Andy Parkins wrote:

> Hello,
> 
> Is there a way to rebase part of a branch?  For example
> 
>                         H---I---J topicB
>                        /
>               E---F---G  topicA
>              /
> A---B---C---D  master
> 
> And I want:
> 
>              H---I---J  topicB
>             /
>             | E---F---G  topicA
>             |/
> A---B---C---D  master

We have
 git-rebase [--merge] [--onto <newbase>] <upstream> [<branch>]

Try then
$ git rebase --onto master topicA topicB

(if you checked out topicB, you don't need last topicB in git-rebase).
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-02 11:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-02 10:45 Rebasing part of a branch Andy Parkins
2006-11-02 11:15 ` Jakub Narebski

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).