Skip to content

Instantly share code, notes, and snippets.

@kennyk
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennyk/04da1c2411911376d85c to your computer and use it in GitHub Desktop.
Save kennyk/04da1c2411911376d85c to your computer and use it in GitHub Desktop.
Batch delete git tags
#delete all remote tags containing "v0"
git ls-remote | grep tags | grep v0 | awk '/^(.*)(\s+)(.*[a-z])/ {print ":" $2}' | grep -v \{ | xargs git push origin
#delete all local tags containing "v0"
git tag -l | grep v0 | awk '/^(.*[a-z])/ {print $1}' | xargs git tag -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment