Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用于实时站点的克隆存储库,我将它从一个裸存储库中提取出来。出于某种原因,每次执行“git pull”时,我都会收到最新消息。但它不是最新的,也没有更新。如果我执行 git reset --hard HEAD^ 然后再次执行 git pull ,更改就会出现。
这里有什么问题,我该如何解决它,以便 git pull 将在不需要硬重置的情况下提取和合并更改?
如果正在处理DETACHED HEAD 就会出现这种情况(有关更多信息,请参阅此 SO 问题)
例如,当您直接签出 SHA1 提交参考时,就会发生这种情况。