change branch command line code example Example 1: git change branch git checkout <<branchName>> Example 2: how to switch branches in git git checkout [branch name]