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