git command line create branch or checkout code example Example 1: create and go to branch git checkout -b <branch_name> Example 2: create a branch command $ git branch -a