git sparse-checkout, 只拉取部分目录

https://github.com/google-research/google-research/tree/master/ google这个仓库太大,我只要instruction_following_eval这个目录,其他目录、git信息啥的都不关心,方法如下:

shell 复制代码
git clone --filter=blob:none --no-checkout https://github.com/google-research/google-research.git --depth=1
cd google-research
git sparse-checkout init --cone
git sparse-checkout add instruction_following_eval
git checkout master

git clone命令中,--no-checkout表示不检出,即先不拉取文件;--filter=blob:none 只下载必要meta数据,进一步减少下载量;--depth=1 限制git历史信息,进一步减少下载量;整体就很快了。

相关推荐
淘矿人13 小时前
从0到1:用Claude启动你的第一个项目
开发语言·人工智能·git·python·github·php·pygame
lpfasd12313 小时前
Git/Gitee/GitHub 3 个安全凭证详解
git·gitee·github
李日灐18 小时前
< 7 > Linux 开发工具:git 版本控制器 和 cgdb/gdb 调试器
linux·运维·服务器·开发语言·git·调试器·gdb/cgdb
Gust of wind18 小时前
idea结合git和Gitee的初步使用
git·gitee·intellij-idea
夜七少eleanor18 小时前
【Git】2026全图文详解安装教程
git
海边的Kurisu18 小时前
从零开始的Git生活 | 刚实习同学的噩梦 And 参与开源不可缺的一环
git·生活
不老刘19 小时前
Git Cherry-Pick:微前端架构下的“精准医疗”与最佳实践
前端·git
爬楼的猪20 小时前
Git Folder Dashboard
git
Uncertainty!!20 小时前
claude code中添加skills自动生成git commit信息
git·git commit·claude code
FserSuN1 天前
Git Worktree 使用学习
git·学习