git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Howard Miller <howard@e-learndesign.co.uk>
To: "Carlos Martín Nieto" <carlos@cmartin.tk>,
	"Howard Miller" <howard@e-learndesign.co.uk>,
	git@vger.kernel.org
Subject: Re: Can't get git rebase --onto to work
Date: Thu, 2 Jun 2011 11:38:53 +0100	[thread overview]
Message-ID: <BANLkTikTi7nryTsyNV5incW3TxaOROyzMw@mail.gmail.com> (raw)
In-Reply-To: <20110602103259.GA30081@centaur.lab.cmartin.tk>

On 2 June 2011 11:32, Carlos Martín Nieto <carlos@cmartin.tk> wrote:
> On Thu, Jun 02, 2011 at 11:17:41AM +0100, Howard Miller wrote:
>> Trying to explain this as concisely as possible.
>>
>> I started with the following branches (names changed to protect the guilty)...
>>
>> * clientA
>> * clientB
>>
>> both have a common ancestry....
>>
>> I then checked out clientB created a new branch clientB_patch and did
>> a load of work and commits.
>>
>> However, I actually wanted all those commits to apply to clientA
>> branch instead so....
>>
>> git checkout clientA
>> git checkout -b clientA_patch     (to ensure I didn't wreck original branch)
>> git rebase --onto clientA_patch clientB clientB_patch
>
> The man page for git-rebase covers this exact situation (around line
> 88 in my version) . In its case, it's
>
>    git rebase --onto master next topic
>
> which translates to your case as
>
>    git rebase --onto clientA clientB clientB_patch
>

Thanks. That's what I said (except I added an extra branch onto
ClientA because I interpreted the instructions - wrongly - to say that
ClientA would change).

However, I've just realised the bit I missed. I still need to do a
(fast forward) merge to get my ClientA_patch branch to actually
reflect the changes. I can't help thinking that (although the diagrams
are perfectly correct) that a line to the effect in the manpage might
have saved some thinking time :)

  reply	other threads:[~2011-06-02 10:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02 10:17 Can't get git rebase --onto to work Howard Miller
2011-06-02 10:32 ` Carlos Martín Nieto
2011-06-02 10:38   ` Howard Miller [this message]
2011-06-02 10:38 ` Tim Guirgies
2011-06-02 10:43   ` Howard Miller
2011-06-02 10:52     ` Tim Guirgies
2011-06-02 10:58       ` Howard Miller
2011-06-02 11:18         ` David
2011-06-02 11:18         ` Tim Guirgies
2011-06-02 11:28           ` Howard Miller

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=BANLkTikTi7nryTsyNV5incW3TxaOROyzMw@mail.gmail.com \
    --to=howard@e-learndesign.co.uk \
    --cc=carlos@cmartin.tk \
    --cc=git@vger.kernel.org \
    /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).