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

Re: howto handle name clashes

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 23, 2012, 18:25 UTC
Message-ID
<7vlimrtbrg.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4F6C7539.3080607@tu-clausthal.de>
Sven Strickroth <sven.strickroth@tu-clausthal.de> writes:
Show 7 quoted lines
> how to handle name clashes for branches and tags? Is there anything I
> can add to the refspec to make the name unique?
>
> E.g.
> - for merging "git merge --no-ff refs/branches/test" works, but
> generates a not so nice default merge message. ("merged  commit
> refs/branches/test" instead of "merged branch test")

That's the price you pay for naming different things the same and having to disambiguate it.

> - how to drop a remote tag/branch ("git push origin :test" does not work)
"git push origin :refs/tags/test"

It is sad that some people teach new people shorthand without telling them that what they are teaching are merely shorthand and cause confusion like this.

Previous: Sven Strickroth
Message 6 of 6 in “howto handle name clashes”
  1. Sven StrickrothMar 23, 2012
  2. Jeff KingMar 23, 2012
  3. Sven StrickrothMar 23, 2012
  4. Jeff KingMar 23, 2012
  5. Sven StrickrothMar 24, 2012
  6. Junio C HamanoMar 23, 2012

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.