Git already up to date unless I reset

北城以北 提交于 2019-12-01 21:32:13

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/2696950/git-already-up-to-date-unless-i-reset

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!