Delete remote branch in git

2013-01-10

I've been using a git for a good while now, and whenever I have had to remove a branch on a remote server I have logged into that machine and deleted the branch like I would on my local machine. In some remotes, like github, this is not possible. Instead you can remove the remote branches with:

$ git push remote-name :branch-to-be-deleted

or alternatively with

$ git push remote-name --delete branch-to-be-deleted