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

Remote's 'currently active branch' not HEAD?

From
Andreas Krey <a.krey@gmx.de>
Date
Sep 3, 2013, 10:46 UTC
Message-ID
<20130903104652.GA5813@inner.h.apk.li>
Hi everyone,

I have a strange behaviour from a bare repo I inherited; when I clone from that one (ssh) the branch checked out is *not* the one referenced in HEAD in the remote repo, but apparently some variation of the alphabetically first or temporally last, or the last *new* branch pushed.

Where would I look to find the reason for this behaviour? How does git transfer the 'current branch' info during the clone?

There is no 'master' branch in the original bare repo, but HEAD points to a valid value (refs/heads/r1).

Testing with another repo unfortunately doesn't show any consistency, more like heisenbuggish.

Andreas
-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
Next: Andreas Krey
Message 1 of 8 in “Remote's 'currently active branch' not HEAD?”
  1. Andreas KreySep 3, 2013
  2. Andreas KreySep 3, 2013
  3. Andreas KreySep 3, 2013
  4. Michael SchubertSep 3, 2013
  5. Andreas KreySep 3, 2013
  6. Junio C HamanoSep 3, 2013
  7. Andreas KreySep 6, 2013
  8. Andreas KreySep 6, 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.