一、

(1)创建一个空的本地仓库

git init

(2)添加远程分支

git remote add  arun git@github.com:itcomputer12/itcomputer12.github.io.git

(3)开启sparse checkout 模式

git config core.sparsecheckout true

(4)把我想要拉取的目录添加到配置文件(类似.ignore文件)

echo 2018/09 >> .git/info/sparse-checkout

(5)最后一步,拉取想要的分支

git pull origin master

  

 

相关文章:

  • 2021-11-22
  • 2021-09-16
  • 2021-11-22
  • 2021-05-21
  • 2022-12-23
  • 2022-01-24
猜你喜欢
  • 2021-09-28
  • 2022-12-23
  • 2021-07-19
  • 2021-05-01
  • 2021-10-31
  • 2021-12-22
  • 2021-09-26
相关资源
相似解决方案