In Git, how can I delete multiple tags before pushing?
I know how to do it with one tag at a time. Not sure if it\'s possible to do multiple.
I found an easy way to do this if you have grep
and xargs
installed. I am shamelessly taking this from https://gist.github.com/shsteimer/7257245.
Delete all the remote tags with the pattern your looking for:
git tag | grep | xargs -n 1 -I% git push origin :refs/tags/%
Delete all your local tags:
git tag | xargs -n 1 -I% git tag -d %
Fetch the remote tags which still remain:
git fetch