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

Re: Recovering Committed Changes in a Detached Head?

From
Miles Bader <miles@gnu.org>
Date
Oct 10, 2011, 01:26 UTC
Message-ID
<87sjn1fxht.fsf@catnip.gol.com>
In-Reply-To
<7vfwj1px6h.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
>> First, maybe git could create refs for these automatically, perhaps
>> with a name like orphans/1?  Maybe these refs would only be visible
>> via git branch --orphans.
>
> Instead of spelling them orphans/$n, you already have @{$n}.
Hmm, shouldn't that be "HEAD@{$n}" (as the reflog output suggests)?

[Well, I dunno, I'm generally kind of confused by the @{...} notation, but I just tried it out, and just @{$n} seems to refer to the current branch, which presumably won't include the orphaned bit once one it's been orphaned...]

Thanks,
-Miles
-- 
`The suburb is an obsolete and contradictory form of human settlement'
Previous: Junio C Hamano
Message 10 of 10 in “Recovering Committed Changes in a Detached Head?”
  1. Daly GutierrezOct 8, 2011
  2. SZEDER GáborOct 8, 2011
  3. Martin FickOct 8, 2011
  4. Joel C. SalomonOct 9, 2011
  5. Martin FickOct 9, 2011
  6. Nguyen Thai Ngoc DuyOct 9, 2011
  7. Ronan KeryellOct 9, 2011
  8. Matthieu MoyOct 9, 2011
  9. Junio C HamanoOct 9, 2011
  10. Miles BaderOct 10, 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.