Skip to content

Instantly share code, notes, and snippets.

@ThinkTankShark
Last active May 15, 2016 19:28
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 ThinkTankShark/70c76a6d347a15d18a0312fbb495c9ad to your computer and use it in GitHub Desktop.
Save ThinkTankShark/70c76a6d347a15d18a0312fbb495c9ad to your computer and use it in GitHub Desktop.
Script to delete all Git tags, local or remote

Copy and paste the script to your terminal

num=0
for t in `git tag`
do
  if [ "$num" -ge 120 ]
    then
      break
  fi
  git push origin :$t
  git tag -d $t
  num=`expr $num + 1`
  echo "Removed $t"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment