git link a local branch to remote code example
Example 1: git overwrite local branch with remote
git reset --hard origin/master
Example 2: git link local branch to remote branch
git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'