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

Re: BUG or FEATURE? Use of '/' in branch names

From
Junio C Hamano <gitster@pobox.com>
Date
May 2, 2014, 22:16 UTC
Message-ID
<xmqq61lnakt4.fsf@gitster.dls.corp.google.com>
In-Reply-To
<AAC0CF0A2CCEC34CBE983015FD81C4F7392A504B61@AICEXMBXCL02.LGE.NET>
Keith Derrick <keith.derrick@lge.com> writes:
> The problem arises when a branch already exists with a name
> matching the stem of the new branch name.
> ...
> But, for the reverse reason, I can't now create the branch named 'hotfix'

All correct. Allowing '/' in branch names came about not with a careful design but was done by a happy accident, and we accepted it under the condition "as long as users know that they cannot have branches D and D/F at the same time, that is fine".

An obvious alternative convention you can adopt would be to use not '/' but some other separating characters (e.g. "_") as your hierarchy delimiter, if you must have D and D_F at the same time.

Previous: Felipe ContrerasNext: Jonathan Nieder
Message 3 of 8 in “BUG or FEATURE? Use of '/' in branch names”
  1. Keith DerrickMay 2, 2014
  2. Felipe ContrerasMay 2, 2014
  3. Junio C HamanoMay 2, 2014
  4. Jonathan NiederMay 2, 2014
  5. Keith DerrickMay 2, 2014
  6. Jonathan NiederMay 2, 2014
  7. Dennis KaarsemakerMay 3, 2014
  8. Michael HaggertyMay 4, 2014

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.