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

Re: Tags from each remote in a separate "name-space"?

From
Sergey Organov <sorganov@gmail.com>
Date
Mar 1, 2019, 14:51 UTC
Message-ID
<87wolizm07.fsf@javad.com>
In-Reply-To
<20190228081103.GA22075@dektop>
Duy Nguyen <pclouds@gmail.com> writes:
Show 18 quoted lines
> On Thu, Feb 28, 2019 at 08:54:23AM +0300, Sergey Organov wrote:
>> Hello,
>> 
>> How do I configure git to handle tags from remotes in a manner similar
>> to branches?
>> 
>> Specifically, I want tag 'tag_name' from remote 'origin' to have local
>> name 'origin/tag_name', not 'tag_name', as it is by default. For a repo
>> with a lot of remotes[*] it would allow to keep track of what tag came from
>> where, as well as prevent name conflicts between tags from different
>> remotes (and/or local tags).
>
> On the fetch side, something like this in the config file (assuming
> "origin" remote here) probably would do
>
> [remote "origin"]
> 	fetch = +refs/tags/*:refs/tags/origin/*
> 	tagOpt = --no-tags
Thanks for the clue, Duy!
Just adding
	fetch = +refs/tags/*:refs/tags/origin/*
for each existing remote configuration seems to do the trick indeed.
Now I wonder if it would make sense to implement something like
  $ git remote add --separate-tags ...
to be able to auto-configure this.
-- 
Sergey
Previous: Duy Nguyen
Message 3 of 3 in “Tags from each remote in a separate "name-space"?”
  1. Sergey OrganovFeb 28, 2019
  2. Duy NguyenFeb 28, 2019
  3. Sergey OrganovMar 1, 2019

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.