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"