hthtya
Last Updated: February 25, 2016
·
3.128K
· iltempo
Schiller gross

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

Say Thanks
Respond

2 Responses
Add your response

1765
Gopher jha gray

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 ·
3122
Cd02928b9714479b681d1d24bb6360d7

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

over 1 year ago ·