public

Bulk remove git tags

Need to prune your tags? Use a simple pattern and nuke them on both the remote and local repo!

Latest Post Svelte 5 tables proper. by Matthew Davis public

Need to prune your tags? Use a simple pattern and nuke them on both the remote and local repo!

TL;DR

First, delete the matching tags on the remote:

git push origin --delete $(git tag -l "v*")

Next, delete t matching tags locally:

git tag -d $(git tag -l "v*")

Bonus

Automagically bump by creating a new incremented tag:

git tag -l --sort=refname|tail -n 1 | awk -F. '{OFS="."; $NF+=1; print $0}'

20.0.10
Matthew Davis

Published 2 years ago