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