Skip to content

Instantly share code, notes, and snippets.

@yvanzo
Created April 1, 2020 12:16
Show Gist options
  • Save yvanzo/716860d79996cfaa920665032a28caf8 to your computer and use it in GitHub Desktop.
Save yvanzo/716860d79996cfaa920665032a28caf8 to your computer and use it in GitHub Desktop.
Clean errant tags from both local working copy and remote repository
#!/bin/sh
for oldtag in delete next-2011-04-14 ocharles/v-2011-05-27-ngs-hotfixes v-20110711-schema-change v-2020-03-30
do
git tag -d "$oldtag"
git push origin :refs/tags/"$oldtag" -f # assuming "origin" points to your own remote repository
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment