git how to set branch to track remote code example Example: git set remote tracking branch git branch -u upstream/foo