gpt4 book ai didi

git - 您的分支比 'origin/cherryPick' 领先 1 次提交。为什么?

转载 作者:太空狗 更新时间:2023-10-29 13:33:03 28 4
gpt4 key购买 nike

我在使用 git pull 时遇到问题。我已经在本地仓库中提交了我的更改。当我执行 git status 时,我确实收到一条消息,说“你的分支在 1 次提交之前领先于‘origin/cherryPick’”。当我尝试从远程存储库中 pull 时,我收到一条消息说“已经是最新的。”。我认为我遗漏了一些基本点。我已将所有 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.

任何帮助将不胜感激

最佳答案

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

关于git - 您的分支比 'origin/cherryPick' 领先 1 次提交。为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2193411/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com