Skip to content

Instantly share code, notes, and snippets.

@housser
Created September 7, 2014 18:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save housser/2daeb1ac115184a90f6f to your computer and use it in GitHub Desktop.
Save housser/2daeb1ac115184a90f6f to your computer and use it in GitHub Desktop.
Remove Git tags based on regular expression, and remove from remote
#!/bin/bash
for i in $( git tag | grep ^6 ); do
#echo item: $i
git tag -d $i
git push origin :refs/tags/$i
done
@somuch
Copy link

somuch commented Dec 4, 2017

very slow.....

@tritoanst
Copy link

git push -d origin $(git tag -l "v1*")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment