How to remove a remote branch in Git?

4

To delete a local branch from Git, just use the command git branch -d <branch> , but how do you get this branch removed on the remote server?

    
asked by anonymous 03.03.2015 / 13:28

1 answer

5

To remove a remote branch, use the following command:

git push origin --delete <branch>

Note that this command only works for Git v1.7.0 or later. For older versions, use:

git push origin :<branch>

Inspirational Response this answer from Stack Overflow.

    
03.03.2015 / 13:28