Git: Create and delete remote branches

On November 30, 2010, in Git, by Dipin Krishna

Many git users frequently do create and delete branches. I often forget the command. So i am now writing it down here. May be, it will be useful to some guys out there too.

Create a remote branch

git push origin new_branch

Where origin is your remote name and new_branch is the name of the branch you want to push up.

Delete a remote branch

git push origin :mybranch

This will delete the “mybranch” branch on the origin remote, but you’ll still need to delete the branch locally with

git branch -d mybranch

Hope, it will help you.

Tagged with:  

Leave a Reply

*

Search