解决仓库中文件过多问题,实现定向拉取文件方法
- git init :建立一个空的本地库
- git remote add origin 仓库地址 :添加远程仓库地址
- git config core.sparsechckout true : 打开sparse checkout 功能
- echo '具体文件' >>.git/info/sparse-checkout : 添加目录到checkout的列表
- git pull origin [branch] :拉取远程分支
具体操作
- git init
- git remote add origin 仓库地址
- git config core.sparsechckout true
- echo 文件名 >>.git/info/sparse-checkout
- git pull origin 分支名