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

Re: bug - Inconsistency of git status and branch, ./git/branches and ./git/HEAD

From
Chris Torek <chris.torek@gmail.com>
Date
Sep 30, 2023, 11:32 UTC
Message-ID
<CAPx1GvdNbHFZdDtWh-s6dN52oxV6L2Ww7CV+SAefenkekiOy+A@mail.gmail.com>
In-Reply-To
<CAPx1GvcjvctrQ-w1MekBs7S+R_7=KhCLUQ915-JAnxEq=BE3iQ@mail.gmail.com>
I should note a slight correction here:
On Sat, Sep 30, 2023 at 4:28 AM Chris Torek <chris.torek@gmail.com> wrote:
> A new, empty repository cannot have any branches, because a branch
> is defined as "the latest commit that is on the branch" (this definition is
> unsatisfyingly circular, but that too is what it is).

This is just one of multiple definitions of "branch" in Git. A branch is also a *set* of commits, and/or a *name*. The fact that the word "branch" has so many meanings in Git makes it almost meaningless: it's like being at a party where everyone is named Chris. Yet somehow we humans still manage to extract meaning from a sentence like "Hey Chris, Chris said to tell you that Chris can't get Chris's car started, so Chris and Chris won't be here."

Chris
Previous: Chris Torek
Message 5 of 5 in “bug - Inconsistency of git status and branch, ./git/branches and ./git/HEAD”
  1. Irina GulinaSep 30, 2023
  2. Irina GulinaSep 30, 2023
  3. Junio C HamanoSep 30, 2023
  4. Chris TorekSep 30, 2023
  5. Chris TorekSep 30, 2023

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.