how to check the upstream branch in git code example Example 1: git check upstream git remote show origin Example 2: check upstream branch git git status -sb