Delete a git tag - made easy
Consistently I forget how to delete a git tag from a current project. That sux! So I wrote this shorty I want to share:
Ok, if you are using bash try this one:
git_remove_tag() {
if [ ! -z "$1" ]; then
git tag -d "$1" && git push origin :refs/tags/$1
fi
}
alias grt=git_remove_tag
Just paste the snippet above in your .profile or .bash_profile file.
To use it, in your terminal type in the alias followed by your tag;
Hal9000: MyAwesomeProject johndoe$ grt 0.5.1
Written by Frank Gregor
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tag
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#