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

Re: [PATCH] git-checkout.txt: improve detached HEAD documentation

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 18, 2011, 00:25 UTC
Message-ID
<7vmxlu89z1.fsf@alter.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.2.00.1102171909412.14920@xanadu.home>
Nicolas Pitre <nico@fluxnic.net> writes:
Show 20 quoted lines
> On Thu, 17 Feb 2011, Junio C Hamano wrote:
> ...
>> You can rectify it by tagging 'c' as a release point and detaching the
>> HEAD at that tag without losing the clarity of the following description.
>> While doing so, it would be better to update the labels in the
>> illustration with s/master/master branch/ and s/[abcde]/commit &/ as well,
>> e.g.
>> 
>> 
>>                    HEAD (refers to branch 'master')
>>                     |
>>                     V
>>   a---b---c---d  branch 'master' (refers to commit 'd')
>>           ^
>>           |
>>      tag 'v2.0' (refers to commit 'c')
>
> While I agree with the above, I think this is still a good idea to keep 
> this example using a non-tagged commit as well.  Perhaps not the first 
> one as you say.

Just to make sure, I wasn't opposed to the idea of showing the history after building a few commits on top of the point you started from, to explain why you might want to re-attach the about-to-be-orphaned commits to the DAG anchored by refs.

IOW, detach at v2.0 tag, experiment with a few commits to fix things up, and then when things go well, make it a maitenance branch, or something.

Previous: Nicolas PitreNext: Jay Soffian
Message 6 of 9 in “git-checkout.txt: improve detached HEAD documentation”
  1. git-checkout.txt: improve detached HEAD documentationJay Soffian, Feb 17, 2011
  2. Jay SoffianFeb 17, 2011
  3. Nicolas PitreFeb 17, 2011
  4. Junio C HamanoFeb 17, 2011
  5. Nicolas PitreFeb 18, 2011
  6. Junio C HamanoFeb 18, 2011
  7. git-checkout.txt: improve detached HEAD documentationJay Soffian, Feb 20, 2011
  8. Junio C HamanoFeb 22, 2011
  9. Jay SoffianFeb 22, 2011

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.