下载 GitHub 仓库「单个文件夹」的方法

方法1
  1. 打开 GitHub,找到要下载的「目标文件夹」,点击进入这个文件夹的页面
  2. 复制浏览器地址栏里的「文件夹完整 URL」(比如:https://github.com/letere-gzj/live2d-widget-v3/tree/main/Resources
  3. 打开 DownGit 官网: https://minhaskamal.github.io/DownGit/
  4. 把第2步复制的文件夹 URL 粘贴到 DownGit 的输入框里,点击「Download」按钮即可
方法2

可以选择在【桌面】打开命令行窗口:

  1. 初始化克隆仓库
bash 复制代码
git clone --filter=blob:none --no-checkout https://github.com/用户名/仓库名.git
  1. 进入克隆的仓库目录
bash 复制代码
cd 仓库名
  1. 开启「稀疏检出」功能,告诉Git:我只需要指定文件夹
bash 复制代码
git sparse-checkout init --cone
  1. 指定要下载的「单个文件夹路径」(路径从仓库根目录开始写,不用加/)
bash 复制代码
git sparse-checkout set 文件夹路径/文件夹名称
  1. 拉取指定文件夹的所有内容

如果是仓库的其他分支名,比如master分支,需要将main换成master

bash 复制代码
git checkout main  

以下载https://github.com/letere-gzj/live2d-widget-v3/tree/main/Resources这个文件夹举例,依次输入以下指令:

bash 复制代码
git clone --filter=blob:none --no-checkout https://github.com/letere-gzj/live2d-widget-v3.git

cd live2d-widget-v3

git sparse-checkout init --cone

git sparse-checkout set Resources

git checkout main
相关推荐
峰向AI4 小时前
AI 画图要好看,还是要可信?小孩子才做选择,我两个都要!
github
ZJU_统一阿萨姆5 小时前
【Git】Github 开源许可证详解
git·开源·github
fthux13 小时前
装闭 RenoPit 源码解析(07):装修闭坑知识库与AI Prompt构建
人工智能·ai·开源·github·open source·renopit
fthux16 小时前
装闭 RenoPit 源码解析(06):SSE如何实时推送AI装修分析进度
人工智能·ai·开源·github·open source·renopit
是烨笙啊18 小时前
拯救 GitHub stars 体验:从 Agent Skill 到浏览器插件
github
小弥儿19 小时前
GitHub今日热榜 | 2026-08-11:图原生基础设施首日登顶
学习·开源·github
码流怪侠20 小时前
用 WiFi 信号数人头:howmanypeoplearearound 项目深度解析
后端·开源·github
大强同学1 天前
零成本部署0penList,三步搞定,我一分钱没花!
github
IT摆渡者1 天前
VM EXSI7.0存储硬盘故障处理
大数据·linux·github
Narrastory1 天前
我用 Claude Code 写代码不到 2 小时,却花了 3 天做完这个软件—Vibe Coding 的正确姿势,是设计不是生成
前端·人工智能·github