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历史信息,进一步减少下载量;整体就很快了。

相关推荐
stevenzqzq5 小时前
git 常用操作
大数据·git
Curvatureflight6 小时前
Git工作流最佳实践:从混乱到优雅
git
wu~9707 小时前
GitHub永不遗忘,使用git push -f来覆盖的提交依旧保留
git·github
Vermouth_009 小时前
git clone的时候提示access denied
git
qq_4376572710 小时前
清楚本地的git并重新登录
git
jiang_changsheng10 小时前
工作流agent汇总分析 2
java·人工智能·git·python·机器学习·github·语音识别
顶点多余11 小时前
版本控制器-git
linux·git
夔曦11 小时前
Git工程日常下拉/上传完整流程(自用)
git
岱宗夫up11 小时前
GitHub Desktop如何设置中文?这不是个简单问题
git·github
岱宗夫up14 小时前
.env 文件是干啥的?为什么不能提交到 Git?
大数据·git·elasticsearch·搜索引擎·gitee·github·gitcode