set local branch to track remote code example
Example 1: create local branch to track remote
git checkout --track origin/some_remote_branch
Example 2: git replace local branch with remote
git reset --hard origin/master
Example 3: git local branch track remote
git branch -u upstream/foo