creating a new branch from existing branch in git code example

Example 1: git create new branch

// Example for creating a new branch named myNewBranch
git checkout -b myNewBranch

// First Push
git push --set-upstream origin myNewBranch

Example 2: create branch from existing branch

$ git checkout -b myFeature dev

Example 3: create a new branch from existing branch in git

git checkout -b subbranch_of_b1 branch1

Example 4: create new branch git

$ git checkout -b newBranchName

Example 5: new branch from existing branch

git checkout -b 

Tags:

Misc Example