基于sparse clone变通方法
创建一个空仓库
拉取远程仓库信息
开启 sparse clone
设置过滤
更新仓库
mkdir develop git init # 初始化
git remote add -f origin http://github.com/git/repo.git # 拉取远程仓库信息
git config core.sparsecheckout true # 开启 sparse clone
echo "develop" >> .git/info/sparse-checkout # 设置过滤条件
git pull origin develop # 拉取仓库