Ruby script for bulk deleting both local and remote Git tags
A very simple Ruby script for bulk deleting your Git tags both local and remote. Create a file called git-deletealltags.bsh and put in the following;
for t in `git tag`
do
git push bitbucket :$t
git tag -d $t
done
Now run this script inside the root of your Git repository and all tags will be deleted.
Written by Robin van der Vleuten
Related protips
1 Response
A better cli local-only alternative is
git tag -l | awk '/^(.*)$/ {print $1}' | xargs git tag -d
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#