# Howto remove accidentally fetched remote tags?

2 messages from 2008-12-09 to 2008-12-09. Participants: roylee17, Jeff King.
Thread: https://gitlist.dev/t/16644

## roylee17, 2008-12-09 03:34

Subject: Howto remove accidentally fetched remote tags?
Message-ID: <1228793683956-1632369.post@n2.nabble.com>
URL: https://gitlist.dev/e/1228793683956-1632369.post%40n2.nabble.com

```

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, 2008-12-09 06:03

Subject: Re: Howto remove accidentally fetched remote tags?
Message-ID: <20081209060339.GA3174@coredump.intra.peff.net>
URL: https://gitlist.dev/e/20081209060339.GA3174%40coredump.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

```
