Eclipse Egit自动将更改拉到本地分支(Eclipse Egit automatically pull changes to local branch)

编程入门 行业动态 更新时间:2024-10-12 03:20:47
Eclipse Egit自动将更改拉到本地分支(Eclipse Egit automatically pull changes to local branch)

我的存储库只有一个分支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的历史记录

在Egit的独立头


另一种解释是当您的master分支没有与之关联的 上游分支 时 。

你需要:

配置上游推送 指定与本地跟踪分支关联的refspec

http://wiki.eclipse.org/images/thumb/e/e2/RepoMgrRemoteConfig.png/800px-RepoMgrRemoteConfig.png

这将从远程仓库获取任何分支,然后放入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

detached head in Egit


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 branch

http://wiki.eclipse.org/images/thumb/e/e2/RepoMgrRemoteConfig.png/800px-RepoMgrRemoteConfig.png

That will fetch any branch from the remote repo and put then in the refs/remote/origin namespace.

更多推荐

本文发布于:2023-08-05 00:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1424449.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:拉到   分支   Egit   Eclipse   branch

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!