This is simple: Just run the following command:
To delete a Git branch both locally and remotely, first delete the local branch using this command:
git branch -d example
(Here example
is the branch name.)
And after that, delete the remote branch using this command:
git push origin :example