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

Re: detached HEAD before root commit - possible?

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jun 24, 2013, 10:41 UTC
Message-ID
<vpqr4frzt81.fsf@anie.imag.fr>
In-Reply-To
<20130623225505.GO20052@goldbirke>
SZEDER Gábor <szeder@ira.uka.de> writes:
Show 8 quoted lines
> I suspect that detaching HEAD before a root commit is not possible by
> design.  What would HEAD contain then!?  'git checkout' seems to
> corroborate:
>
> $ git init
> Initialized empty Git repository in /tmp/test/.git/
> $ git checkout --detach
> fatal: You are on a branch yet to be born
Is "git checkout --orphan" what you're looking for?
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C Hamano
Message 5 of 5 in “detached HEAD before root commit - possible?”
  1. SZEDER GáborJun 23, 2013
  2. Jonathan NiederJun 23, 2013
  3. Martin von ZweigbergkJun 24, 2013
  4. Junio C HamanoJun 24, 2013
  5. Matthieu MoyJun 24, 2013

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.