Skip to content

Instantly share code, notes, and snippets.

@tut-tuuut
Last active August 29, 2015 14:23
Show Gist options
  • Save tut-tuuut/12c1d45e1b58a3de3abd to your computer and use it in GitHub Desktop.
Save tut-tuuut/12c1d45e1b58a3de3abd to your computer and use it in GitHub Desktop.
# Change the egrep pattern to match the tags you want to REMOVE
# here, every tag beginning with "dev"
TAGS=`git tag -l | egrep '^dev/'` ; \
for TAG in $TAGS ; do
git tag -d $TAG
git push origin :refs/tags/$TAG
done
# Change the egrep pattern to match the tags you want to KEEP
TAGS=`git tag -l | egrep --invert-match '\-2013\.06\.[0-9]{2}-[0-9]*$'` ; \
for TAG in $TAGS ; do
git tag -d $TAG
git push origin :refs/tags/$TAG
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment