dwightNgan
3/8/2018 - 8:30 AM

delete multiple tags in local and remote

delete multiple tags in local and remote

#delete the tags in remote, pattern matches the tags which you wanna keep
git tag | grep -v 'pattern' | xargs git push origin --delete

#delete the tag in local
git tag | grep -v 'pattern' xargs git tag -d