Created
August 15, 2018 17:59
-
-
Save ernado/d812c151f6c0a2491b9bd72754108b3f to your computer and use it in GitHub Desktop.
Remove multiple git tags from remote
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This will remove tags starting from "v0.15.1-" | |
git tag | grep '^v0.15.1-' > tags-to-remove.txt | |
cat tags-to-remove.txt | xargs git tag -d | |
cat tags-to-remove.txt | xargs -I% git push origin :refs/tags/% | |
rm tags-to-remove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment