From a06d5529339da2ebc472c2581188a2a8874acdef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=83=20pitr?= Date: Thu, 24 Jan 2013 13:16:08 -0500 Subject: [PATCH] fix delete-branch to work with same-name tags when there's a tag and a branch with the same name, git errors out with `error: dst refspec MY_BRANCH matches more than one.` git-delete-tag is not affected by this bug --- bin/git-delete-branch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-delete-branch b/bin/git-delete-branch index bde6fdc..1417a65 100755 --- a/bin/git-delete-branch +++ b/bin/git-delete-branch @@ -4,4 +4,4 @@ branch=$1 test -z $branch && echo "branch required." 1>&2 && exit 1 git branch -D $branch git branch -d -r origin/$branch -git push origin :$branch +git push origin :refs/heads/$branch