Skip to content

Instantly share code, notes, and snippets.

@andreyrusanov
Last active January 21, 2019 13:35
Show Gist options
  • Select an option

  • Save andreyrusanov/7e085289d5c937a4c224f43ecaf7068b to your computer and use it in GitHub Desktop.

Select an option

Save andreyrusanov/7e085289d5c937a4c224f43ecaf7068b to your computer and use it in GitHub Desktop.
Remove all Git tags except certain
# Locally:
git tag | grep -v "staging.*\|production.*" | xargs git tag -d
# Remote:
git tag | grep -v "staging.*\|production.*" | xargs -n 1 git push --delete origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment