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

Re: Question about bare repositories

From
Junio C Hamano <junkio@cox.net>
Date
Mar 16, 2007, 10:05 UTC
Message-ID
<7vhcslv701.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200703160947.03833.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
> Why does a bare repository have/need a HEAD?

To mark which branch the repository owner considers the primary branch of the repository. I think "git pull $URL" (i.e. without using shorthand arranged in the config nor $GIT_DIR/remotes/) defaults to fetching and merging HEAD from there, for example (I say "I think" because it's been a while I did so myself, and we might have broken it during the 1.5.0 process, which had a lot of work in that area).

Previous: Andy ParkinsNext: Andy Parkins
Message 2 of 4 in “Question about bare repositories”
  1. Andy ParkinsMar 16, 2007
  2. Junio C HamanoMar 16, 2007
  3. Andy ParkinsMar 16, 2007
  4. Johannes SchindelinMar 16, 2007

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.