git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.
Previous: Pascal ObryNext: Junio C Hamano
Message 2 of 12 in “Question about git rebase --onto”
  1. Pascal ObryFeb 2, 2010
  2. Junio C HamanoFeb 2, 2010
  3. Junio C HamanoFeb 2, 2010
  4. Pascal ObryFeb 2, 2010
  5. Junio C HamanoFeb 4, 2010
  6. Pascal ObryFeb 4, 2010
  7. Junio C HamanoFeb 4, 2010
  8. Pascal ObryFeb 17, 2010
  9. Tay Ray ChuanFeb 17, 2010
  10. Pascal ObryFeb 17, 2010
  11. Tay Ray ChuanFeb 17, 2010
  12. Pascal ObryFeb 17, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.