简体   繁体   English

Egit 中的远程跟踪分支背后的几个提交

[英]Remote tracking branch in Egit several commits behind

I'm new to GIT and use EGit with Eclipse.我是 GIT 的新手,并在 Eclipse 中使用 EGit。 I try to understand the Remote Tracking folder in eGits Git Repositories view.我尝试了解 eGits Git Repositories视图中的Remote Tracking文件夹。 I'm working in a branch who has already been published to the remote repository.我在一个已经发布到远程存储库的分支中工作。 I'v made changes which I already pushed to the remote repository.我做了一些已经推送到远程存储库的更改。 In the Git Repositories view the displayed commit id for my branch under Local is the last commit id.Git 存储库视图中,我的分支在本地下显示的提交 ID 是最后一个提交 ID。 But when I select the corresponding branch under Remote Tracking the commit id is a different one - an older one as shown in the history (See screenshots below).但是当我在Remote Tracking下选择相应的分支时,提交 id 是不同的 - 如历史记录中所示的旧的(见下面的截图)。 Why is that?这是为什么? I was under the impression this should show the state of the remote repository.我的印象是这应该显示远程存储库的状态。 This would allow me to see the difference between a branch in local repository and its corresponding remote repository.这将使我能够看到本地存储库中的分支与其对应的远程存储库之间的区别。 Or is there a better way to do this with EGit?或者有没有更好的方法可以用 EGit 做到这一点? Is that a normal state of this Remote Tracking branch?这是远程跟踪分支的正常状态吗?

History of local branch:本地分行历史: 地方分行历史 History of remote branch, several commits behind:远程分支的历史,背后的几次提交: 在此处输入图片说明

I was under the impression this should show the state of the remote repository.我的印象是这应该显示远程存储库的状态。

It show the state of the remote repository at the time of your last fetch.它显示上次获取时远程存储库的状态。

Make sure you do fetch from Egit your remote repo , and then check the history of the remote tracking branch again: it should be updated (assuming, as commented, that you had pushed your commits).确保你确实从 Egit 你的远程 repo 获取,然后再次检查远程跟踪分支的历史记录:它应该被更新(假设,正如评论的那样,你已经推送了你的提交)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM