针对自己的项目

方法一

基于sparse clone变通方法

  • 创建一个空仓库
  • 拉取远程仓库信息
  • 开启 sparse clone
  • 设置过滤
  • 更新仓库

创建空仓库

mkdir devops
cd devops
git init  # 初始化

拉取远程仓库信息

git remote add -f origin http://your/git/repo.git  # 拉取远程仓库信息

开启 sparse clone

git config core.sparsecheckout true  # 开启 sparse clone

设置过滤

echo "devops" >> .git/info/sparse-checkout  # 设置过滤条件

更新仓库

git pull origin master # 拉取仓库

方法二(可能没用)

使用 svn

  • 打开对应目录
  • 将其 url 中的 /tree/master/ 更换为 /trunk/
  • 使用svn 下载
文件的url: https: //github.com/Mooophy/Cpp-Primer/tree/master/ch03 ## 将/tree/master/
换为 /trunk/ 

svn checkout https://github.com/Mooophy/Cpp-Primer/trunk/ch03  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2021-07-19
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-23
  • 2021-08-15
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2022-02-14
相关资源
相似解决方案