how to change head branch in git code example Example 1: git change branch git checkout <<branchName>> Example 2: change branch git git checkout <branch_name>