git delete remote branch — push delete
Quick Answer
# Delete the remote branch
git push origin --delete feature/my-branch
# Delete the local branch (if you also want that gone)
git branch -d feature/my-branch
When to use this
A feature branch has been merged and you want to clean it up on the remote (GitHub / GitLab / Bitbucket).
Other causes & fixes
Force-delete a local branch that is not fully merged
git branch -D feature/my-branch # uppercase D skips the merge check
Prune remote tracking refs for deleted branches
After others delete branches on the remote, your local repo still shows stale origin/branch entries. Prune them:
git fetch --prune
# or configure git to prune automatically:
git config --global fetch.prune true
List all remote branches
git branch -r
Related