关于git提示git branch --set-upstream-to=<remote>/<branch> master的问题
·
问题类型:本地仓库和远程仓库没有关联
问题情景:在推送本地项目至远程仓库时所遇到的问题
错误代码:
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 <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> master
错误原因:本地分支和远程分支没有关联
解决方案: git branch --set-upstream-to=<remote>/<branch> master
remote:代表远程库名
branch:远程分支的名称
比如:git branch --set-upstream-to=gitee/master master
【记录一些学习过程中所遇到的问题以及个人解决方案,希望可以给大家提供一些解决思路】*
新一代开源开发者平台 GitCode,通过集成代码托管服务、代码仓库以及可信赖的开源组件库,让开发者可以在云端进行代码托管和开发。旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。
更多推荐


所有评论(0)