git - GitHub 和 GitLab 是否支持 git clone 的 --filter 参数?

标签 git github gitlab jgit rugged

我想使用 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/

相关文章:

search - Github 搜索 : how to search in multiple languages

xcode - ./configure 未被识别为 cmdlet 的名称

build - 是否可以仅在 .gitlab-ci.yml 文件中设置顶级/除外?

git - 如何在git中有当前文件而不是文件历史?

Git for Windows - 程序无法启动,因为缺少 libiconv2.dll

git - 如果 merge 到 master,如何删除所有不会导致更改的本地分支?

gitlab转移到新服务器而不创建备份

添加相同文件的 Git cherry-pick 提交

git - 远程 url 环境变量

git-crypt 明文保护?