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
Written by Alexander Greim
Related protips
2 Responses
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/47994/gopher_jha_gray.png)
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
·
![](https://coderwall-assets-0.s3.amazonaws.com/uploads/user/avatar/5624/cd02928b9714479b681d1d24bb6360d7.jpeg)
What about git push --delete remote-name branch-name
? Not that obscure even if you don't know the internals.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#