how to get local branches in git from remote code example Example 1: git get remote branches git branch -r Example 2: git get local branches git branch -l