Re: Question about git rebase --onto
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 2, 2010, 18:11 UTC
- Message-ID
- <7v636f7biw.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <4B6865A9.60603@obry.net>
Pascal Obry <pascal@obry.net> writes:
Show 10 quoted lines
> It seems to me that: > > $ git co topic > $ git rebase --onto master topic~2 topic > > Used to do the job and rebase the topic branch as expected. Today when I > tried with 1.7.0.rc1.10.gb8bb after the rebase above I was left on a > detached head. > > Is my recollection wrong? Has this been changed recently?
Either a recent bug or a user error, I think, as we didn't intend to change. My quick manual test didn't show such a bug but rebase is one of the areas that acquired new code recently.
Possible user errors I can think of are:
- If 'topic' is not a local branch, the result will be on a detached HEAD, as you are starting from a detached HEAD (i.e. 'topic' could be a tag);
- Until you resolved and said "rebase --continue" (or --skip) to allow it to conclude the rebase when the operation conflicted, you would be on a detached HEAD.