Git — Delete Remote Branch

git push <remote> :<remote_branch>

in my case

git push origin :membership_processing

Deletes the membership_processing branch on origin (remote)

11 Comments

  1. Eugen says:

    Thank you for your tip. I was trying to do something like:

    git branch -d origin/membership_processing

    But it didn’t work. Your tip worked perfectly!

  2. John Sedlak says:

    Thank you for the tip!

  3. soundarapandian says:

    Thanks.Very useful ๐Ÿ™‚

  4. Yes, indeed — it is useful ๐Ÿ™‚

  5. Sfate says:

    Hi, Yuji.
    Can you describe fully what happens on ‘git push origin :membership_processing’
    Case.. as i know.. git push will update project on your remote repo with your commit(-s).
    Thanks in advance.

  6. Raz says:

    it updates remote branch with nothing. so it is removed

  7. Atul Bhosale says:

    Thanks … very useful

  8. It’s a shortcut for

    git push origin –delete BRANCH_NAME

  9. Laurent says:

    git branch -rd origin/branchtodelete
    (r as remote)

Leave a reply to psylone Cancel reply