问题
使用git pull拉取远程分支代码的时候,提示:
> There is no tracking information for the current branch.
Please specify which branch you want to merge with.
这个报错的意思是:新建的本地分支在推送远程仓库时,本地的分支与远程分支没有建立关联。
![](https://img2020.cnblogs.com/blog/1208468/202108/1208468-20210829161014102-692594286.png)
查看关联
git branch -vv:可以查看本地分支与远程仓库的关联关系
可以看到并没有关联
![](https://www.pianshen.com/images/85/ba052317099bfa86d2b89ac7c6c564dd.png)
关联后:
![](https://img2020.cnblogs.com/blog/1208468/202108/1208468-20210829161013817-1684446822.png)
解决
按照git给的提示git branch --set-upstream-to=origin/SP_4.2.1_20200703_alpha
![](https://www.pianshen.com/images/112/63bd2943439e3a891f98bdf20d87bc88.png)
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> dev