There is no tracking information for the current branch

There is no tracking information for the current branch.

原因

当前分支没有关联的远程分支,也就是说当前分支push和pull时不知道去远程仓库的哪个分支进行拉取或者推送

造成这个问题往往是在本地分支和远程分支未关联的情况下使用git push或者git pull忽略了参试导致

解决方案

方案一

#当前本地分支关联远程分支
git branch --set-upstream-to=仓库名(origin)/分支名
#拉取
git pull
#推送
git push

方案二

#拉取和推送时,指定远程仓库分支名
git pull 仓库名(origin) 分支名
git push 仓库名(origin) 分支名
posted @   鸭梨的药丸哥  阅读(27)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示