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

Re: Ambiguous branch names...

From
Duy Nguyen <pclouds@gmail.com>
Date
Feb 16, 2014, 22:47 UTC
Message-ID
<CACsJy8Cfv0-QQBX=Psm28wWbpM8Jra4POPUGgsFbn6EB2Yk9Zw@mail.gmail.com>
In-Reply-To
<20140216203439.GA15538@localhost>
On Mon, Feb 17, 2014 at 3:34 AM, Ingo Rohloff <lundril@gmx.de> wrote:
Show 20 quoted lines
> Hello,
>
> while trying out git (version 1.7.9.5), I did this:
>
> git clone -- ssh://myserver/~rohloff/git/w1.git w1
>
> So I just cloned a test repository.
> The in the cloned "w1" repository I executed:
>
> git branch origin/master
> git branch remotes/origin/master
> git branch refs/remotes/origin/master
>
> I now have got three *local* branches with the above names, which
> now seems to make it impossible to refer to the master branch
> from the "origin" *remote* repository.
>
> Wouldn't it make sense to forbid such names for local branches ?
> For example to enforce some rules like a local branch name *must not*
> start with "remotes/" or "refs/" ?

See http://thread.gmane.org/gmane.comp.version-control.git/242096/focus=242181. The proposal basically is you can't create those branches without -f.

-- 
Duy
Previous: Ingo Rohloff
Message 2 of 2 in “Ambiguous branch names...”
  1. Ingo RohloffFeb 16, 2014
  2. Duy NguyenFeb 16, 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.