git checkout upstream branch code example
Example 1: git checkout branch from remote to local
git checkout -b test origin/test
Example 2: git checkout remote branch
git checkout --track origin/<branchname>
Example 3: get a remote branch git
$ git checkout --track origin/newsletter
Branch newsletter set up to track remote branch newsletter from origin.
Switched to a new branch 'newsletter'
Example 4: git get remote branch
git fetch
git checkout test
Example 5: check upstream branch git
git status -sb