Git – Create New Branch From Existing Branch

By | November 23, 2016

To create a new branch from existing one you first have to checkout new branch locally, then push it to remote so other can see it. Below are the exact commands.

Create new branch from existing branch locally

git checkout -b {NEW_branch_name} {SOURCE_branch_name}

Specifying -b causes a new branch to be created

Push changes to origin

git push origin {NEW_branch_name}


Leave a Reply

Your email address will not be published.