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

Re: master^ is not a local branch -- huh?!?

From
SDSteve Diver <squelch2@googlemail.com>
Date
Feb 1, 2010, 11:52 UTC
Message-ID
<31a97741002010352x1ad27f26ia4d51857bb2d2d4f@mail.gmail.com>
On 30/01/2010 06:03, Junio C Hamano wrote:
>Nicolas Pitre <nico@fluxnic.net> writes:
>>First, I'm afraid that "Checking out commit 'foobar'" might be confusing
>>as this may happen through either a remote branch, a tag, or any random
>>commit.  It seems to me that "Checking out 'v2.5'" is less confusing
>>than "Checking out commit 'v2.5'".  But that's a minor detail and
>>probably a personal preference.
...
>>To the contrary: this "detached HEAD" is exactly what you need if you
>>want to relate to any documentation or perform a search for more
>>information.  Like it or not, this detached HEAD term is exactly what
>>this Git concept is all about and how it is designated everywhere.  The
>>sooner Git users see and learn about it the better.
>As I am not good at keeping track of different proposals to change this
>word here and that word there, I expect this will probably need at least
>few rotations of earth to get input from people in different timezones,
>and I think this is post 1.7.0 item anyway, I'll queue the attached draft
>in 'pu' and keep it there, to make it easier for others to tweak the
>message.

Would it be a safe assumption to describe a 'detached HEAD' state as being synonymous with a (local) personal scratchpad or temporary workspace based on and from the original committed object?

If this assumption is correct, then maybe this notion of a scratchpad may be more intuitive and conceptual to new users without getting bogged down with the necessary semantics of the terms used, but can also preserve references to 'detached HEAD' in the documentation for a fuller explanation.

A scratchpad or temporary workspace description alludes to its semi permanent nature, and can warn that the subsequent commits may be lost through aging and garbage collection until the user "commits" to saving their progress through the creation a new branch, and thereby making them permanent.

I must say the explanations presented in this thread have shed some light on what is on the face of it a common trap that leaves new users wondering "What happened to my work!" and I thank you all.

Steve
Next: Junio C Hamano
Message 1 of 24 in “Re: master^ is not a local branch -- huh?!?”
  1. Steve DiverFeb 1, 2010
  2. Junio C HamanoFeb 1, 2010
  3. Sergei OrganovFeb 1, 2010
  4. Ron GarretFeb 1, 2010
  5. Petr BaudisFeb 1, 2010
  6. Nicolas PitreFeb 1, 2010
  7. Junio C HamanoFeb 1, 2010
  8. Ron GarretFeb 1, 2010
  9. Petr BaudisFeb 2, 2010
  10. Ron GarretFeb 2, 2010
  11. Junio C HamanoFeb 2, 2010
  12. Ron GarretFeb 2, 2010
  13. J. Bruce FieldsFeb 2, 2010
  14. Ron GarretFeb 2, 2010
  15. J. Bruce FieldsFeb 3, 2010
  16. Nicolas PitreFeb 2, 2010
  17. Ron GarretFeb 2, 2010
  18. Nicolas PitreFeb 2, 2010
  19. tytso@mit.eduFeb 2, 2010
  20. Junio C HamanoFeb 2, 2010
  21. Junio C HamanoFeb 2, 2010
  22. Nicolas PitreFeb 1, 2010
  23. Jay SoffianFeb 1, 2010
  24. Steve DiverFeb 1, 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.