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?
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?
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.