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