how to check remote branch against a local branch git code example Example 1: git get remote branches git branch -r Example 2: check upstream branch git git status -sb