From: Junio C Hamano Date: Thu, 04 Feb 2010 01:12:41 GMT Subject: Re: Question about git rebase --onto Message-ID: <7vhbpx3it2.fsf@alter.siamese.dyndns.org> In-Reply-To: <4B686CAC.7020103@obry.net> Pascal Obry writes: >> Possible user errors I can think of are: >> ... > I'm not on this case. > ... > I'm not in this case either. Thenk there are some _other_ differences between your situation and what I can construct from your problem description: 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.... which I tried myself before giving you a reply, and I didn't end up on a detached HEAD. But I cannot guess what that difference you are not telling us is (and you probably don't know it either, I suspect). Writing reproducible test case would be a great way to diagnose this.