From: Tay Ray Chuan <rctay89@gmail.com>
To: pascal@obry.net
Cc: Junio C Hamano <gitster@pobox.com>, git list <git@vger.kernel.org>
Subject: Re: Question about git rebase --onto
Date: Wed, 17 Feb 2010 18:46:08 +0800 [thread overview]
Message-ID: <be6fef0d1002170246r2b5c444cpdfce0678531564dd@mail.gmail.com> (raw)
In-Reply-To: <4B7BC4A7.5070902@obry.net>
Hi,
On Wed, Feb 17, 2010 at 6:27 PM, Pascal Obry <pascal@obry.net> wrote:
>> Why do you add the last parameter ("HEAD")? If I run the rebase
>> without it, it works fine (ie. not on a detached HEAD).
>
> Right, without the final HEAD it is working. But it ought to work with
> it too. Hence my report.
In your original report though, you didn't say "HEAD"; you used a
branch. I quote:
On Wed, Feb 3, 2010 at 1:49 AM, Pascal Obry <pascal@obry.net> wrote:
>
> It seems to me that:
>
> $ git co topic
> $ git rebase --onto master topic~2 topic
I'm not trying to nit-pick, but it does matter - "git rebase --onto
foo baz~x baz" and "git rebase --onto foo HEAD~x HEAD" are quite
different.
According to the docs, the last parameter <branch> specifies the
branch to checkout to first before the rebasing takes place.
Therefore, I believe the behaviour you're experiencing when you
specify "HEAD" for the <branch> parameter is correct - git does a "git
checkout $(git rev-parse HEAD)", so you start the rebase on a detached
HEAD.
--
Cheers,
Ray Chuan
next prev parent reply other threads:[~2010-02-17 10:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 17:49 Question about git rebase --onto Pascal Obry
2010-02-02 18:11 ` Junio C Hamano
2010-02-02 18:15 ` Junio C Hamano
2010-02-02 18:19 ` Pascal Obry
2010-02-04 1:12 ` Junio C Hamano
2010-02-04 16:46 ` Pascal Obry
2010-02-04 16:50 ` Junio C Hamano
2010-02-17 9:25 ` Pascal Obry
2010-02-17 10:19 ` Tay Ray Chuan
2010-02-17 10:27 ` Pascal Obry
2010-02-17 10:46 ` Tay Ray Chuan [this message]
2010-02-17 11:18 ` Pascal Obry
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=be6fef0d1002170246r2b5c444cpdfce0678531564dd@mail.gmail.com \
--to=rctay89@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pascal@obry.net \
/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).