git bash go to branch code example Example 1: git switch branch to another branch git checkout <name> Example 2: how to switch branches in git git checkout [branch name]