Skip to content

Instantly share code, notes, and snippets.

@ilyar
Forked from shsteimer/gist:7257245
Created September 29, 2017 13:15
Show Gist options
  • Save ilyar/a187eeec53d04d89eeb9e4cf184eae51 to your computer and use it in GitHub Desktop.
Save ilyar/a187eeec53d04d89eeb9e4cf184eae51 to your computer and use it in GitHub Desktop.
Tip to delete tags by pattern
#delete all the remote tags with the pattern your looking for, ie. DEV-
git tag | grep <pattern> | 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment