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

Re: Howto remove accidentally fetched remote tags?

From
Jeff King <peff@peff.net>
Date
Dec 9, 2008, 06:03 UTC
Message-ID
<20081209060339.GA3174@coredump.intra.peff.net>
In-Reply-To
<1228793683956-1632369.post@n2.nabble.com>
On Mon, Dec 08, 2008 at 07:34:43PM -0800, roylee17 wrote:
> Is there a convenient way to remove tags which accidentally( forgot adding
> --no-tag ) fetched from a remote repo?
How about
  $ git tag -l >tags-to-delete
  $ $EDITOR tags-to-delete
  $ xargs git tag -d <tags-to-delete
?
> Will git add tag namespace( like branch namespace) in the future?
> In this case, we can manage tags as convenient as branches.

I don't think there any plans for it. You can get something close by doing this:

  $ git config --add remote.origin.fetch '+refs/tags/*:refs/tags/origin/*'
  $ git config remote.origin.tagopt --no-tags

The big difference is that you are asking to fetch _all_ tags here, whereas the usual tag operation is to grab tags that point to anything you are already getting via branches. But in practice, that is usually the same content anyway.

-Peff
Previous: roylee17
Message 2 of 2 in “Howto remove accidentally fetched remote tags?”
  1. roylee17Dec 9, 2008
  2. Jeff KingDec 9, 2008

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.