see all branch and remote branch in git code example Example 1: git list remote branches git branch -r Example 2: get all remote branches git fetch --all