您的分支位于“origin/cherryPick”之前通过 1 次提交。为什么?

发布于 2024-08-20 00:00:36 字数 688 浏览 7 评论 0原文

我在 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.

如有任何帮助,我们将不胜感激

I am having issue with git pull.I have commited my changes in local repo. When I do git status I do get a message saying "Your branch is ahead of 'origin/cherryPick' by 1 commit". When I try to pull from remote repository I get a message saying "Already up-to-date.".I think Iam missing some fundamental point.I have pasted the log below of all the 3 commands

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.

Any help would be appreciated

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情愿 2024-08-27 00:00:36

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

I'd say conceptually, the fundamental point you're missing is that if you're ahead of the remote repo by one commit, it's the remote repo that's out of date, not you. You need to push your changes to them, not pull, because there's nothing to pull. Chances are you've got all the remotely available commits, so you are indeed up to date.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文