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

Re: Is it by design you can create a branch called 'HEAD'?

From
Junio C Hamano <gitster@pobox.com>
Date
May 21, 2012, 22:13 UTC
Message-ID
<7vr4ud6v4g.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CANgJU+UAbpFvROFynZ-MHzfhEYksM-Mhf5rVjcA6GUhk6BX-NQ@mail.gmail.com>

As you can see from the "warnings", we by design strongly discourage it, but just have been (and still are) lazy to think of a reason not to allow people who really want to do so, so the code is lenient if the user asks.

The plan behind these "warnings" obviously is that in future versions of git we would make them even stronger and eventually forbid perhaps all-caps names from anywhere inside refs/ hierarchy.

Previous: demerphq
Message 2 of 2 in “Is it by design you can create a branch called 'HEAD'?”
  1. demerphqMay 21, 2012
  2. Junio C HamanoMay 21, 2012

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.