How to delete a git branch both locally and on the server

You have to delete both branches individually. First delete the remote branch:

$ git push --delete <remote_name> <branch_name>

Then delete the local branch:

$ git branch -d <branch_name>