Open rogerxu opened 7 years ago
Track current branch to an upstream branch
git branch -u origin/master
git branch --set-upstream-to=origin/master
git push -u origin master
Tracking remote branch and creating a local branch with the same name.
git checkout -t origin/{{branch_name}}
Add a branch in remote fetch list.
git remote set-branches --add origin master
[remote "origin"]
fetch = +refs/heads/master:refs/remotes/origin/master
$ git remote set-url origin <url>
Make an existing Git branch track a remote branch? - Stack Overflow