_49mca
Last Updated: February 25, 2016
·
432
· adamjonas

Deleting remote branches

git
git push <remote> :<remote_branch>

in my case

git push origin :oauth-config

2 Responses
Add your response

2872

There is more intuitive

git push --delete origin branch_name

in git for several versions already.

over 1 year ago ·
3671

what you're doing is using git's ability to not have a 1 to 1 push requirement.

You can do:

git push origin experimental_branch:master

and that will push your experimental branch to the master branch.

git push origin :master 

is pushing "nothing" to master thereby deleting it.

over 1 year ago ·