set tracking beanch git code example
Example 1: git link local branch to remote branch
git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
Example 2: git set remote tracking branch
git branch -u upstream/foo
git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'
git branch -u upstream/foo