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

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

From
Nicolas Pitre <nico@fluxnic.net>
Date
Feb 18, 2011, 00:14 UTC
Message-ID
<alpine.LFD.2.00.1102171909412.14920@xanadu.home>
In-Reply-To
<7v7hcy9vrk.fsf@alter.siamese.dyndns.org>
On Thu, 17 Feb 2011, Junio C Hamano wrote:
Show 26 quoted lines
> Jay Soffian <jaysoffian@gmail.com> writes:
> 
> > +It is sometimes useful to be able to checkout a commit that is not at
> > +the tip of any named branch, or even to create a new commit that is not
> > +referenced by a named branch. Let's look at what happens when we
> > +checkout commit b:
> 
> I think it is a regression from the original text to omit mention of tags
> and replace the first example of the section with a more advanced use case
> of jumping to the middle of a branch; it is far more likely that a user
> would want to detach at a specific release point.
> 
> 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.

Nicolas
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 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.