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

相关推荐
互联网中的一颗神经元16 小时前
ZZ — Git 速查表
大数据·git·elasticsearch
早安试言18 小时前
git使用
git
燐妤18 小时前
梦绘片场 ProjectDream故事总纲场景剧本篇:从项目到成片的 AI 漫剧工作台
人工智能·git·ai·项目开发
JackieDYH1 天前
Git 与 GitHub 新电脑配置指南(从零开始)
git·github·工具·使用教程
Jeanyia2 天前
GitLab 配套 Git 常用命令
git·gitlab
10mAh2 天前
【Git】误删分支、reset --hard 后提交丢了怎么办?——reflog、fsck 与安全恢复实战
数据库·git·安全·回归
Lydro2 天前
CentOS 7 安装高版本git
git·centos 7
guwentian2 天前
Git Worktree 实战:用并行多 Agent 把开发提速 N 倍
大数据·git·elasticsearch·wroktree
不吃鱼的羊2 天前
Git识别未修改的文件有修改
git
蓝黑墨水2 天前
一个git问题的处理
git