From e563a8b111e36d39ee4d28cddcdc5a88ea49b6f6 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Wed, 18 Jan 2017 16:05:05 -0200 Subject: [PATCH] also nuke tags --- bin/git-nuke | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/git-nuke b/bin/git-nuke index d3657cf52..80f3b5138 100755 --- a/bin/git-nuke +++ b/bin/git-nuke @@ -1,6 +1,6 @@ #!/bin/sh # -# Nukes a branch locally and on the origin remote. +# Nukes a branch or tag locally and on the origin remote. # # $1 - Branch name. # @@ -8,5 +8,6 @@ # # git nuke add-git-nuke -git branch -D "$1" +git show-ref --verify refs/tags/"$1" && git tag -d "$1" +git show-ref --verify refs/heads/"$1" && git branch -D "$1" git push origin :"$1"