Last Updated: September 09, 2019
·
3.345K
· iltempo

Removing a remote branch in git

The most obscure commands of git (unless you know the internals) is the one to remove remote branches. You have to do a push with the branch name lead by a colon:

git push origin :branch

2 Responses
Add your response

Actually it is not that obscure, it's more like
"git push origin <nothing>:branch".
But it tends to be not that obvious in the beginning ;)

over 1 year ago ·

What about git push --delete remote-name branch-name? Not that obscure even if you don't know the internals.

over 1 year ago ·