我正在尝试从远程分支更新我的存储库,但在执行“git pull”时不断收到此错误。我没有进行任何本地更改,即使我进行了更改也不需要保留它们。
我试过:
git reset --hard
我遇到了同样的问题
唯一似乎有效的方法是删除有问题的文件并再次尝试 git pull。
我还尝试了 git stash
,然后是 git pull
。不行。
编辑:使用 PortableGit-1.6.4-preview20090729,因此应该修复任何以前带有虚假错误的错误。
最佳答案
如果您更新索引以忽略某些文件,可能会发生这种情况:
git update-index --assume-unchanged <file>
然后例如检查其他一些分支:
git checkout <branch>
> error: Entry '<file>' not uptodate. Cannot merge.
强制索引刷新解决了这个问题:
git update-index --really-refresh
<file>: needs update
其次是:
git reset --hard
然后一切都应该恢复正常。
关于Git pull : error: Entry foo not uptodate. 无法 merge ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1248029/