Push to (create) or delete remote branch
Lets say you checked out a new local branch and committed some changes. Now you want to share this new branch with other developers. You can upload the new branch easily with the following command.1
git push origin newfeature
origin
is the name of the remote repository und newfeature
is the name of the branch you want to upload.
Deleting remote branches is easier that creating them.1
git push origin :newfeature
This command deletes branch newfeature
in the remote repository origin
. Although You have to delete the branch locally with git branch -d newfeature
.
Translated to english from here.