I want to delete a branch both locally and remotely.
$ git branch -d
Use:
git push origin :bugfix # Deletes remote branch git branch -d bugfix # Must delete local branch manually
If you are sure you want to delete it, run
git branch -D bugfix
Now to clean up deleted remote branches run
git remote prune origin