新建本地分支后将本地分支推送到远程库, 使用git pull 或者 git push 的时候报错
git branch --set-upstream-to=origin/远程主分支的名字(一般是master) 新建分支的名字
git branch --set-upstream-to=origin/remoteBranch yourBranch
其中,origin/remoteBranch是你本地分支对应的远程分支;yourBranch是你当前的本地分支。
git push origin 分支