git branch checkout master code example
Example 1: git branch and checkout at the same time
$ git checkout -b <branch_name>
Example 2: how to switch branches in git
git checkout [branch name]
$ git checkout -b <branch_name>
git checkout [branch name]