// delete branch locally git branch -d localBranchName // delete branch remotely git push origin --delete remoteBranchName
# Fetch changes from all remotes and locally delete # remote deleted branches/tags etc # --prune will do the job :-; git fetch --all --prune
$ git branch -a # *master # b1 # remote/origin/master # remote/origin/b1 $ git push origin --delete b1 # [...] # - [deleted] b1
$ git branch -r | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | xargs git branch -d