switch branch git terminal code example Example 1: canging branch in git $ git checkout feature Example 2: sitch a branch command line $ git branch