git list the branches code example Example 1: how to see all branches in git git branch -a Example 2: git list remote branches git branch -r