创建空仓库
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 # 拉取仓库
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐