简体   繁体   English

Git 日志缺少最新提交

[英]Git log missing latest commit

I pushed a commit from my MacBook into the master branch of a project, but the commit doesn't appear on my Windows laptop ( git log ), it only appears on my MacBook ( git log ) or on the Bitbucket web interface of the repo.将 MacBook 的提交推送到项目的 master 分支,但该提交没有出现在我的 Windows笔记本电脑 ( git log ) 上,它只出现在我的 MacBook ( git log ) 或回购的 Bitbucket Web 界面上.

How is that possible?这怎么可能?

Both git local repos are referring to the same branch (master), and to the same bitbucket repo (one is pointing to it via SSH, the other (Windows) via HTTPS).两个 git 本地存储库都指的是同一个分支(主)和同一个 bitbucket 存储库(一个通过 SSH 指向它,另一个(Windows)通过 HTTPS 指向它)。

Commit happened 40 minutes ago, so I doubt any delay is occuring here.提交发生在 40 分钟前,所以我怀疑这里发生了任何延迟。

Even after a pull/fetch, a simple git log (which defaults to git log master ) would not show the commit pushed.即使在 pull/fetch 之后,一个简单的git log (默认为git log master )也不会显示提交的推送。

Try git log origin/master (after at least a git fetch )尝试git log origin/master (至少在git fetch

Try to run git fetch or git pull on the Windows laptop.尝试在 Windows 笔记本电脑上运行git fetchgit pull

Git Log does not update automatically on every push to the origin repository. Git 日志不会在每次推送到源存储库时自动更新。

git fetch will fetch the changes from the remote repo but won't merge them into your local repo, while git pull will fetch the changes and try to merge them into your local repo. git fetch将从远程存储库中获取更改,但不会将它们合并到您的本地存储库中,而git pull将获取更改并尝试将它们合并到您的本地存储库中。

Here are some useful inks:以下是一些有用的墨水:

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

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