Skip to contentSkip to conversation

Howto remove accidentally fetched remote tags?

DISCUSSION roylee17 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

roylee17

author
#0 lore raw

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

Signature · 2 lines
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.
#1 lore raw
Quoted 2 lines · 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

?

Quoted 2 lines

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