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

Re: fatal: bad revision 'HEAD'

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 13, 2009, 04:36 UTC
Message-ID
<7v1vngmitn.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20090813023137.GA17358@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> I.e., I have done in the past (but not frequently):
>
>   git symbolic-ref HEAD refs/heads/to-be-born
>
> in an existing repository to create a new root.

I honestly do not know of a sane reason (other than "because I can") anybody would want to _start_ a new root in a repository with an existing history. And doing a "pull" with or without --rebase immediately after starting a new root is doubly insane, as you say.

I do not think _ending up to_ have more than one root in your repository is necessarily insane. You may find a related project that earlier started independently but later turned out to be better off managed together with your project, and at that point you may perform Linus's "coolest merge ever" to bind the two histories together, resulting in a history with more than one root.

But that is the kind of "ending up to have" I am talking about; it is not something you _aim to_ create on purpose. If you want to _start_ a separate history, and if you are sane, you would start the separate history in a separate repository.

Previous: Jeff KingNext: Jeff King
Message 8 of 11 in “fatal: bad revision 'HEAD'”
  1. Joel MahoneyAug 9, 2009
  2. Jeff KingAug 10, 2009
  3. Jeff KingAug 12, 2009
  4. Junio C HamanoAug 12, 2009
  5. Jeff KingAug 12, 2009
  6. Junio C HamanoAug 12, 2009
  7. Jeff KingAug 13, 2009
  8. Junio C HamanoAug 13, 2009
  9. Jeff KingAug 13, 2009
  10. Joel MahoneyAug 13, 2009
  11. Jeff KingAug 13, 2009

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.