git track code example
Example 1: git track remote branch
$ git checkout --track origin/dev
Branch dev set up to track remote branch dev from origin.
Switched to a new branch 'dev'
Example 2: 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 3: git set remote tracking branch
git branch -u upstream/foo