If you want to make a branch from some another branch then follow bellow steps:
Assumptions:
BranchExisting
is the name of branch from which you need to make a new branch with name BranchMyNew
.Steps:
Fetch the branch to your local machine.
$ git fetch origin BranchExisting : BranchExisting
This command will create a new branch in your local with same branch name.
Now, from master branch checkout to the newly fetched branch
$ git checkout BranchExisting
You are now in BranchExisting. Now create a new branch from this existing branch.
$ git checkout -b BranchMyNew
Here you go!