Git稀疏签出错误“条目'路径/到/文件'未更新.无法更新稀疏结帐" [英] Git sparse checkout error "Entry 'path/to/file' not update. Cannot update sparse checkout"
问题描述
我刚刚按照以下步骤进行了稀疏结帐
I've just done a sparse checkout following the steps below
git clone http://location/repo.git
# create .git/info/sparse-checkout file
git config --bool core.sparsecheckout true
git read-tree -mu HEAD
不幸的是,最后一步失败并显示错误消息
Unfortunately the final step fails with the error message
Entry 'path/to/file' not update. Cannot update sparse checkout
这很奇怪,因为(1)存在 path/to/file
(2)在另一台机器git版本1.7.1(Centos 6)上成功完成了稀疏签出过程.当前的机器是安装了git版本1.8.3.1的Centos 7机器.两台机器上的 git config --list
输出相同.
Which is strange because (1) path/to/file
exists (2) the sparse checkout process succeeded on another machine git version 1.7.1 (Centos 6). The current machine is a Centos 7 box with git version 1.8.3.1 installed. The output of git config --list
is identical on both machines.
推荐答案
我基本上通过删除所有文件并重复相同的步骤来解决了该问题.已被建议可能是git中的错误或IMO某种文件损坏.
I fixed the problem essentially by removing all the files and repeating the same steps. It has been suggested that this could be a bug in git, or IMO some sort of file corruption.
另一个对我有用的解决方案(YMMV).尝试反复检出问题目录并运行 git read-tree
Another solution that worked for me (YMMV). Try repeatedly checking out and the problematic directory and running git read-tree
- git checkout-路径/
- git read-tree -mu HEAD
这篇关于Git稀疏签出错误“条目'路径/到/文件'未更新.无法更新稀疏结帐"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!