gitbranch--set-upstream本土关联远程仓库转载
原创最近使用git pull我多次遇到以下情况:
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/
事实上,提示信息的输出仍然相对清晰。
使用git在本地创建新分支后,需要建立远程分支关联。如果没有关联,git系统将提示您添加以下操作中显示的关联。
协会的目的是git pull, git push操作时无需指定相应的远程分支,只要不显示指定的,git pull何时,将提示您。
解决方案是根据提示添加它:
git branch --set-upstream-to=origin/remote_branch your_branch
其中,origin/remote_branch您的本地分支是否对应于远程分支;your_branch是您当前的本地分支机构。
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除