Last active
May 16, 2020 14:36
-
-
Save tthyer/f64cda9ce740fe04b52cd24a21be09ff to your computer and use it in GitHub Desktop.
remove all git tags, local and 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 | |
# pass tags as arguments to script | |
# if no arguments, nothing will be removed | |
# for example to remove all tags run ./remove-tags.sh $(git tag) | |
tags=( "$@" ) | |
for i in ${tags[@]} | |
do | |
git push --delete origin $i | |
git tag -d $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment