Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git-幻影本地提交_Git_Github - Fatal编程技术网

Git-幻影本地提交

Git-幻影本地提交,git,github,Git,Github,我们正在使用Github。偶尔,在一次git拉动之后,我运行git status,并被告知我领先于origin/master,这很奇怪,因为我认为我已经承诺了一切。所以我做了一个git推送 果然,没什么可推的。所以我再次运行git status,这次“幻影本地提交”消失了;毕竟,我并没有领先于origin/master 我的队友也经历过这种情况。我们只是在开始使用Github时才注意到它 知道这里发生了什么吗? 下面是一个来自我的终端的示例,就在我执行了一个git pull之后 ~/projec

我们正在使用Github。偶尔,在一次
git拉动之后
,我运行
git status
,并被告知我领先于
origin/master
,这很奇怪,因为我认为我已经承诺了一切。所以我做了一个git推送

果然,没什么可推的。所以我再次运行
git status
,这次“幻影本地提交”消失了;毕竟,我并没有领先于
origin/master

我的队友也经历过这种情况。我们只是在开始使用Github时才注意到它

知道这里发生了什么吗?

下面是一个来自我的终端的示例,就在我执行了一个
git pull
之后

~/projects/formula[master]% git status
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
nothing to commit (working directory clean)
~/projects/formula[master]% git push origin master
Everything up-to-date
~/projects/formula[master]% git status
# On branch master
nothing to commit (working directory clean)
~/projects/formula[master]%

你试过以下方法吗

git remote update orgin

它将更新远程
源站的状态。您还可以省略
origin
并立即更新所有远程设备。

您可以使用
git log[--pretty=oneline]master…origin/master
列出这些提交。这实际上是做什么的?我所知道的REPO之间的唯一通信是推送和拉送。
远程更新
获取指定远程的配置分支。请参阅远程..获取
at。