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

Re: What's the definition of a valid Git symbolic reference?

From
KFKevin P. Fleming <kpfleming@digium.com>
Date
Feb 19, 2011, 13:10 UTC
Message-ID
<4D5FC15A.30309@digium.com>
In-Reply-To
<4D5A0901.7080202@dbservice.com>
On 02/14/2011 11:02 PM, Tomas Carnecky wrote:
Show 9 quoted lines
> On 2/15/11 4:49 AM, Emeric Fermas wrote:
>> Another possibility would be that only git internal symbolic
>> references are allowed to live under the ".git" dir (HEAD, FETCH_HEAD,
>> ...) and that user defined symrefs should live under refs/. In this
>
> All refs should live under refs/ (except the special ones like HEAD
> etc). It's usually a mistake if someone manages to create one outside of
> refs/. The plumbing commands allow you to do that, but users usually
> shouldn't use those.

Being able to manually point HEAD at a ref is actually useful; when I've created repos that start out with a 'vendor branch', I want to do the initial import into a branch called 'upstream', not 'master'. Using 'git symbolic-ref HEAD refs/heads/upstream' in a brand-new repo allows that to happen, and works quite well.

Please don't take it away :-)
-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kfleming@digium.com
Check us out at www.digium.com & www.asterisk.org
Previous: Tomas CarneckyNext: Junio C Hamano
Message 5 of 8 in “What's the definition of a valid Git symbolic reference?”
  1. Emeric FermasFeb 14, 2011
  2. Kevin BallardFeb 15, 2011
  3. Emeric FermasFeb 15, 2011
  4. Tomas CarneckyFeb 15, 2011
  5. Kevin P. FlemingFeb 19, 2011
  6. Junio C HamanoFeb 15, 2011
  7. Emeric FermasFeb 15, 2011
  8. Jeff KingFeb 15, 2011

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.