how to track branch git code example
Example 1: create local branch to track remote
git checkout --track origin/some_remote_branch
Example 2: pull remote branches
git fetch origin
git checkout --track origin/<remote_branch_name>
Example 3: how to track a branch on github
$ git checkout --track origin/serverfix
Branch serverfix set up to track remote branch serverfix from origin.
Switched to a new branch 'serverfix'
Example 4: check upstream branch git
git status -sb