I want to delete a branch both locally and remotely.
$ git branch -d
You can also do this using git remote prune origin
git remote prune origin
$ git remote prune origin Pruning origin URL: git@example.com/yourrepo.git * [pruned] origin/some-branchs
It prunes and deletes remote-tracking branches from a git branch -r listing.
git branch -r