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

相关推荐
高志小鹏鹏1 小时前
告别“修复 bug”:让别人一眼看懂你的 Commit
git·github·代码规范
Rabbit_QL5 小时前
【Git基础】03——Git 撤销与回退:改错了怎么办
大数据·git·elasticsearch
无限进步_5 小时前
【C++&string】寻找字符串中第一个唯一字符:两种经典解法详解
开发语言·c++·git·算法·github·哈希算法·visual studio
木下~learning6 小时前
零基础Git入门:Linux+Gitee实战指南
linux·git·gitee·github·虚拟机·版本控制·ubunt
zh_xuan6 小时前
修改远程仓库名以及和本地工程同步
git
读书札记20227 小时前
Git 配置用户名和邮箱 解决 fatal: unable to auto-detect email address 问题
git
程序员 沐阳7 小时前
Git 二分法精准定位 Bug:从原理到实战,让调试效率起飞
git·elasticsearch·bug
陳10308 小时前
Linux:入门开发工具--Git和GUN调试器
linux·运维·git
淼淼爱喝水8 小时前
Ansible 常用文件模块详解(copy、file、fetch)
chrome·git·github
wdfk_prog8 小时前
解决 Linux 使用符号链接的 Git 仓库在 Windows 下无法创建符号链接的问题
linux·windows·git