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