Last active
May 7, 2020 14:54
-
-
Save pwc3/28c0afebc055a13c99e5b6a1be73a330 to your computer and use it in GitHub Desktop.
Remove Git Tag
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
#!/usr/bin/env bash | |
set -euo pipefail | |
E_BADARGS=85 | |
if [ $# -ne 1 ]; then | |
echo "Usage: $(basename $0) tag-name" | |
exit $E_BADARGS | |
fi | |
tagname="$1" | |
# Delete the local tag | |
echo "Deleting local tag $tagname" | |
git tag --delete $tagname | |
# Delete the remote tag | |
echo "Deleting remote tag $tagname" | |
git push --delete origin $tagname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment