您的分支位于“origin/cherryPick”之前通过 1 次提交。为什么?
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想说,从概念上讲,您缺少的基本点是,如果您领先于远程存储库一次提交,那么是远程存储库过时了,而不是您。您需要将更改推送给它们,而不是拉动,因为没有什么可以拉动。您很可能已经获得了所有远程可用的提交,因此您确实是最新的。
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.