git push <remote*> :<branch-to-remove>
Also to delete/remove tag in remote server, you can use
git push <remote> :refs/tags/<tag-to-remote>
These commands might seem weird and hard to remember. To be able to remember them easier, I suggest you to see this full git push command
git push <remote> <local-branch-name>:<remote-branch-name>
Then to delete is to push empty branch to expected branch on remote. That's all why.
*remote is an alias of other repository see git remote
Credit: How to: Delete a remote Git tag
==
Update
The current version of git now support argument --delete for push. So now you can delete branch hello from origin with this command
git push --delete origin hello
No comments:
Post a Comment