view all git branch remote code example Example 1: get all remote branches git fetch --all Example 2: show all remote branches git git remote show <remote-name>