Skip to content

Instantly share code, notes, and snippets.

@default-writer
Forked from okunishinishi/Remove all git tags
Last active April 10, 2022 14:27
Show Gist options
  • Save default-writer/504889ad68708eefd8f7500e478d1958 to your computer and use it in GitHub Desktop.
Save default-writer/504889ad68708eefd8f7500e478d1958 to your computer and use it in GitHub Desktop.
git-clear-tags.sh
#!/usr/bin/env bash
#Delete local tags.
git tag -d $(git tag -l)
#Fetch remote tags.
git fetch
#Delete remote tags.
git push origin --delete $(git tag -l) # Pushing once should be faster than multiple times
#Delete local tags.
git tag -d $(git tag -l)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment