Skip to content

Instantly share code, notes, and snippets.

@derhasi
Created September 2, 2015 14:00
Show Gist options
  • Save derhasi/699dee86093cd3bcc6d0 to your computer and use it in GitHub Desktop.
Save derhasi/699dee86093cd3bcc6d0 to your computer and use it in GitHub Desktop.
Bulk delete tags
# git tag | grep build | while read -r TAGNAME; do echo "this is tag $TAGNAME"; done
# git push --delete origin $TAGNAME; git tag -d $TAGNAME
#
# Delete all tags containing a specified search term: e.g. "build" in this example
#
KEYWORD="build";
git tag | grep $KEYWORD | while read -r TAGNAME; do git push --delete origin $TAGNAME; git tag -d $TAGNAME; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment