我的存储库只有一个分支HEAD。 我的本地分支是主人,我通常在我当地的分支机构检查。 现在,当我拉它时,它不会更新我的本地主人。 我必须右键单击master - > merge,然后选择远程分支 - > HEAD,然后更新也将在master上。 我在互联网上走了几个小时,但我似乎无法理解分支系统或这些参考如何工作。 有人可以解释我做错了什么,我该如何解决? 有时它会推动一个新的主分支。 (创建一个新的分支)
My repository has only one branch HEAD. My local branch is master and I'm usually checked out on my local branch. Now when I pull it won't update my local master. I have to right click on master -> merge, then select remote branches -> HEAD and then updates will be on master too. I went around Internet for hours but I can't seem to understand branch system or how these refs work. Can someone explain what I'm doing wrong and how can I fix it? And sometimes it pushes a new master branch. (creates a new branch itself)
最满意答案
我的存储库只有一个分支HEAD
但是HEAD不是一个分支。 它代表了将要提交的内容,但它可以是一个独立的HEAD 。
在“ EGIT branches local vs Remote tracking ”中查看更多信息,您可以在其中查看没有HEAD的历史记录
另一种解释是当您的master分支没有与之关联的 上游分支 时 。
你需要:
配置上游推送 指定与本地跟踪分支关联的refspec这将从远程仓库获取任何分支,然后放入refs/remote/origin命名空间。
My repository has only one branch HEAD
But HEAD isn't a branch. It represents what will be committed, but it can be a detached HEAD.
See more at "EGIT branches local vs Remote tracking", where you can see an history with no HEAD
The other explanation is when your master branch has no upstream branch associated to it.
You need to:
configure the upstream push specify the refspec associated to your local tracking branchThat will fetch any branch from the remote repo and put then in the refs/remote/origin namespace.
更多推荐
发布评论