how to switch git branch to master code example Example: how to switch branches in git git checkout [branch name]