简体   繁体   English

无法查看远程git repo上的最新提交

[英]unable to see recent commits on remote git repo

I have a local repo with branch X, which is associated with a private GitHub repo branch X. There are two "remotes" added, origin and backup, both pointing to the same GitHub repo (using https). 我有一个带有分支X的本地存储库,该分支与一个私有GitHub存储库分支X关联。添加了两个“远程”,即origin和backup,都指向同一个GitHub存储库(使用https)。

If I do a git log origin/X I see the most recent commit is 826d562 from May 2nd. 如果我执行git log origin / X,我看到最近的提交是5月2日以来的826d562。 If I do the same with backup/X , I see dc32de2, d78498c, f3ed5a8, 16f7c17, and then 826d562, with the others from 5/15 to 5/6. 如果我对backup / X进行相同操作,则会看到dc32de2,d78498c,f3ed5a8、16f7c17,然后是826d562,其他的从5/15到5/6。

IOW, it shows more recent commits that I and others have pushed to the remote repo. IOW,它显示了我和其他人已推送到远程仓库的最新提交。

I created a VM on another machine, setup the same remote repo, did a fetch and checked out branch X and it too, shows 826d562 as the HEAD. 我在另一台计算机上创建了一个VM,设置了相同的远程存储库,进行了提取并签出了分支X,它也显示了826d562作为HEAD。 A coworker on his machine, sees the dc32de2 version and all the others. 他计算机上的一位同事看到了dc32de2版本以及所有其他版本。

If I go to GitHub and look at this branch on the repo, it shows the latest as 826d562 and not dc32de2! 如果我去GitHub并在仓库中查看该分支,它显示的最新版本为826d562,而不是 dc32de2!

Why do I see (or not see) these newer commits on the remote between the various machines? 为什么我在各种机器之间的远程上看到(或看不到)这些较新的提交?

Why do two "remotes" pointing to the same repo, from the same machine, show different things? 为什么来自同一台机器的两个指向同一仓库的“远程”显示不同的内容?

I'm totally baffled! 我完全感到困惑!

Along the lines of authentication expiring, I did some Googling and came across this command: 随着身份验证过期,我进行了一次Google搜索,并遇到了以下命令:

git credential-cache exit

I did that, and then did a fetch, and got an update. 我这样做了,然后进行了获取,并进行了更新。 I did "git status" and it says my branch is behind, so I rebased and now when I do "git log" I see all the recent commits. 我做了“ git status”,它说我的分支落后了,所以我重新设置了基础,现在当我做“ git log”时,我看到了所有最近的提交。

I'm using https to access the Github repo, using Ubuntu 12.04 as my OS in all cases. 我使用https来访问Github存储库,在所有情况下都使用Ubuntu 12.04作为我的操作系统。 If anyone has thoughts on the reasoning behind what is going on, I'd love to hear it, but it does work now on the other system. 如果有人对正在发生的事情背后的原因有任何想法,我很想听听,但是它现在可以在其他系统上运行了。

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

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