# see if remote has branch present
local branch=AC-branch
if git show-ref -q refs/remotes/origin/$branch; then
+ git fetch --tags
if [ -z "$(git tag --points-at $branch 2>/dev/null)" ]; then
echo >&2 "There's no tag pointing to current $branch; refusing to delete branch"
return 1
fi
+ # delete local branch if exists
+ git show-ref -q refs/heads/$branch && git branch -d $branch
+
+ # drop remote branch
git push --delete origin $branch
fi