Last active
August 29, 2015 14:23
-
-
Save kennyk/04da1c2411911376d85c to your computer and use it in GitHub Desktop.
Batch delete git tags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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