how to know the remote branch git code example Example 1: git get remote branches git branch -r Example 2: check upstream branch git git status -sb