我想使用 git 的 partialClone
特征。在这个answer我看到了 git clone --filter=tree:none <repo>
命令。
但是在github上尝试执行时,提示warning: filtering not recognized by server, ignoring
.它没有用。
我想知道是不是github官网不支持,还是我的设置有问题。
我问了GitHub的反馈人员,没有得到技术人员的答复。
最佳答案
几乎可以肯定,GitHub 或 GitLab 还不支持这一点。
--filter
选项正在积极开发中,尚未真正准备好用于通用用途。 GitHub 的 blog post about the release of Git 2.19 in September, 2018 says
Note that most public servers do not yet support the feature, but you can play with
git clone --filter=blob:none
against your local Git 2.19 install.
一旦此功能开发得更加完善并且主机开始支持它,我相信他们不会悄悄这样做。据我所知,目前还没有主要的云提供商发布这样的公告。
OP 2019-03-21 更新:
Not long ago, I received an official reply from github. They think that the
--filter
parameter is still an immature feature and is accompanied by some security issues. Therefore, this feature will not be supported in the short term.
关于git - GitHub 和 GitLab 是否支持 git clone 的 --filter 参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55195590/