针对自己的项目
基于sparse clone变通方法
mkdir devops
cd devops
git init  # 初始化
git remote add -f origin http://your/git/repo.git  # 拉取远程仓库信息
git config core.sparsecheckout true  # 开启 sparse clone
echo "devops" >> .git/info/sparse-checkout  # 设置过滤条件
git pull origin master # 拉取仓库
使用 svn
文件的url: https: //github.com/Mooophy/Cpp-Primer/tree/master/ch03 ## 将/tree/master/
换为 /trunk/ 
svn checkout https://github.com/Mooophy/Cpp-Primer/trunk/ch03  原文:https://www.cnblogs.com/xkus/p/9692842.html