git local branch set remote code example Example: git set remote tracking branch git branch -u upstream/foo