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

Proposal for pruning tags

From
RDRobert Dailey <rcdailey.lists@gmail.com>
Date
Jun 5, 2014, 14:51 UTC
Message-ID
<CAHd499BLX3q2FHLfFpq_14w2mmosywfRqMHVjkke0BRhAAjx7g@mail.gmail.com>

I've never contributed to the Git project before. I'm a Windows user, so I use msysgit, but I'd be happy to install linux just so I can help implement this feature if everyone feels it would be useful.

Right now AFAIK, there is no way to prune tags through Git. The way I currently do it is like so:

$ git tag -l | xargs git tag -d $ git fetch --all

This is not only wasteful, but dangerous. I might accidentally delete a local tag I haven't pushed yet. What would be great is if we had the following:

git tag prune [<remote>|--all]

The <remote> is needed in decentralized workflows (upstream vs origin). I'd also like to see an `--all` option in place of the remote, which means it will prune local tags from all remotes. I'm not sure if this command line structure will work, but it can be altered as necessary.

Alternatively, this might also make sense on the remote command:
git remote prune <remote> --tags

Again I'm not an expert at the internals of Git, so I wanted to share my idea with the community first to see if this holds water or if there is already some built in way of doing this. Thanks for hearing out my idea!

Next: Junio C Hamano
Message 1 of 5 in “Proposal for pruning tags”
  1. Robert DaileyJun 5, 2014
  2. Junio C HamanoJun 5, 2014
  3. Robert DaileyJun 6, 2014
  4. Junio C HamanoJun 6, 2014
  5. Michael HaggertyJun 11, 2014

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.