git拉取单个子目录

2022-10-14,

初始化一个目录cron(需要拉取的的是code下的cron目录)

git init cron

进入目录
cd cron/

git remote add -f code ssh://git@192.168.1.3:8080/test/test.git

git config core.sparsecheckout true

echo code/cron/ >> .git/info/sparse-checkout

git pull ssh://git@192.168.1.3:8080/test/test.git master (选取分支拉取)

《git拉取单个子目录.doc》

下载本文的Word格式文档,以方便收藏与打印。