threads / discuss / 16644

Howto remove accidentally fetched remote tags?

Subject: Howto remove accidentally fetched remote tags?

## tl;dr

2 messages between Dec 9, 2008 and Dec 9, 2008.

replies: 1people: 2as markdown or json

roylee17· Dec 9, 2008, 03:34 UTC · lore
Hi,

Is there a convenient way to remove tags which accidentally( forgot adding --no-tag ) fetched from a remote repo?

Will git add tag namespace( like branch namespace) in the future? In this case, we can manage tags as convenient as branches.

Thanks.
Roy
-- 
View this message in context: http://n2.nabble.com/Howto-remove-accidentally-fetched-remote-tags--tp1632369p1632369.html
Sent from the git mailing list archive at Nabble.com.
Jeff King· Dec 9, 2008, 06:03 UTC · re: roylee17 · lore

Re: Howto remove accidentally fetched remote tags?

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

← back to recent threads