git add branch from master code example
Example 1: create new branch git from master
git checkout -b new-branch-name
Example 2: command to create a new branch in git
$ git checkout -b <branch-name>
git checkout -b new-branch-name
$ git checkout -b <branch-name>