创建空仓库 mkdir testing cd testing git init 拉取远程仓库信息 git remote add -f origin http://your/git/repo.git # 拉取远程仓库信息 开启 sparse clone git config core.sparsecheckout true # 开启 sparse clone 设置过滤 echo "testing" >> .git/info/sparse-checkout # 设置过滤条件 更新仓库 git pull origin master # 拉取仓库