Delete a Git Branch In Local And Remotely

C++
git push <remote_name> --delete <branch_name>$ 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
Source

Also in C++: