create and checkout a new branch code example
Example 1: create and go to branch
git checkout -b <branch_name>
Example 2: git checkout new branch
// create and checkout new branch in one line
git checkout -b new_branch
Example 3: creating new branch in git
Create a new branch named issue1.
$ git branch testing
Example 4: git create and checkout branch
$ git branch <branch_name>
$ git checkout <branch_name>