create new branch from another branch git code example
Example 1: create new branch git
$ git checkout -b [name_of_your_new_branch]
Example 2: branch from other branch
// Go first to the branch where you want to make a copy of
git checkout -b subbranch branch
Example 3: create a new branch from existing branch in git
git checkout -b subbranch_of_b1 branch1
Example 4: how to create a branch in git
$ git branch [name of branch]