Skip to content

Instantly share code, notes, and snippets.

@pwc3

pwc3/git-rmtag

Last active May 7, 2020
Embed
What would you like to do?
Remove Git Tag
#!/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
You can’t perform that action at this time.