4

我遇到了 git pull 的问题。我已经在本地仓库中提交了我的更改。当我执行 git status 时,我确实收到一条消息,说“您的分支比 'origin/cherryPick' 领先 1 个提交”。当我尝试从远程存储库中提取时,我收到一条消息说“已经是最新的。”。我认为我错过了一些基本点。我已将所有 3 个命令的日志粘贴在下面

wh-test $ git branch -a
alternate

* cherryPick

  master

 new

  squashBranch

  testBranch

  remotes/origin/HEAD -> origin/master

  remotes/origin/cherryPick

  remotes/origin/master

  remotes/origin/testBranch

 git status
# On branch cherryPick

# Your branch is ahead of 'origin/cherryPick' by 1 commit.
#

git pull origin cherryPick

From ssh://xxxx.dyndns.org/home/shopapp/wh-test

 * branch            cherryPick -> FETCH_HEAD

Already up-to-date.

任何帮助,将不胜感激

4

1 回答 1

7

从概念上讲,您缺少的基本点是,如果您在一次提交之前领先于远程存储库,则远程存储库已过时,而不是您。您需要将更改推送给它们,而不是拉动,因为没有什么可以拉动的。您可能已经获得了所有远程可用的提交,因此您确实是最新的。

于 2010-02-03T16:17:13.913 回答