create and switch to new branch code example
Example 1: how to make new branch and switch in git
git checkout -b myNewBranch
Example 2: create branch from existing branch
$ git checkout -b myFeature dev
Example 3: git command to create a branch from another branch
$ git checkout -b myfeature dev