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