how to list branches of git repo code example Example 1: git list remote branches git branch -r Example 2: branch list in git git branch -a