问题描述
我有一个用于生活网站的克隆回购,并且我从裸仓回购了。由于某种原因,每次执行git pull时,我都会收到已经更新的消息。但它不是最新的,也没有更新。如果我做了一个git reset --hard HEAD ^,然后git pull再次发生变化。
这里有什么问题,我该如何修复它,以便git拉将拉和合并更改,而不需要硬重置?
如果正在工作一个SHA1提交参考,例如。
I have a cloned repo I use for the live site and I have it pull from a bare repo. For some reason every time I execute "git pull" I get the already up to date message. But it's not up to date and not updated. If I do a git reset --hard HEAD^ and then git pull again, the changes come in.
What's the problem here and how do I fix it so that git pull will pull and merge changes in without needing a hard reset?
That would be the case if are working on a DETACHED HEAD (see this SO question for more)
That happens when you checkout directly a SHA1 commit reference, for instance.
这篇关于Git已经是最新的,除非我重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!