git list branches in repository code example Example 1: git list remote branches git branch -r Example 2: branch list in git git branch -a