git-remove-tag: Remove tags from local and remote
Our repository is garbage with a lot of version tags because our system works with signed tags. Our release script deploy the latest signed tag from master.
This is a small shell function to remove the tag from local and then the remote repository:
function git-remove-tag {
if [[ -z $2 ]]; then remote="origin"; else remote=$2; fi
git tag -d $1; git push $remote :refs/tags/$1
}
Now I can remove all really-urgent-bugfix-for-delivery version tags:
for v in `git tag | grep "\d.\d.\d.\d"`; do git-remove-tag $v bucket; done
Written by Balazs Nadasdi
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#