Skip to content

Instantly share code, notes, and snippets.

@Zeex
Created November 28, 2012 14:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zeex/4161788 to your computer and use it in GitHub Desktop.
Save Zeex/4161788 to your computer and use it in GitHub Desktop.
Shell script that deletes all Git tags
#!/bin/sh
me=`basename $0`
if [ $# -ne 1 ]
then
echo Usage: $me remote
exit 1
fi
remote=$1
echo Deleting ALL tags on $remote
for tag in `git tag`
do
git tag -d $tag && git push $remote :refs/tags/$tag
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment