Skip to content

Instantly share code, notes, and snippets.

@mmozuras
Forked from spajus/gist:5213420
Last active December 17, 2015 10:49
Show Gist options
  • Save mmozuras/5597484 to your computer and use it in GitHub Desktop.
Save mmozuras/5597484 to your computer and use it in GitHub Desktop.
Delete all git tags locally and remotely based on their name length
for t in `git tag`
do
if [[ ${#t} -lt 20 ]]; then
echo keeping $t
else
git push origin :$t
git tag -d $t
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment