git branch --set-upstream-to=origin/<远程分支> <本地分支>
如:
git branch --set-upstream-to=origin/master master
其中: origin/master 是远程分支的名字
master是本地分支名字