【问题标题】:Your branch is ahead of 'origin/cherryPick' by 1 commit. Why?您的分支领先于 'origin/cherryPick' 1 个提交。为什么?
【发布时间】:2011-01-12 16:46:44
【问题描述】:

我遇到了 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.

任何帮助将不胜感激

【问题讨论】:

    标签: git git-pull


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2012-04-27
      • 1970-01-01
      • 2021-07-02
      • 2013-04-23
      • 1970-01-01
      • 2022-01-04
      • 2011-01-26
      相关资源
      最近更新 更多