how to get branch from git code example Example 1: git get local branches git branch -l Example 2: git branch from current branch git checkout -b <branch-name>