gitlib下克隆自己的项目的子文件项目

现在有一个仓库http://kf-gitlab-166/workspace/work 你要gitclone里面的work/debug子目录: 在本地的硬盘位置打开Git Bash

git init work && cd work    //新建仓库并进入文件夹
git config core.sparsecheckout true //设置允许克隆子目录

echo 'debug*' >> .git/info/sparse-checkout //设置要克隆的仓库的子目录路径   //空格别漏

git remote add origin http://kf-gitlab-166/workspace/work.git  //这里换成你要克隆的项目和库

git pull origin master    //下载


 

发布了78 篇原创文章 · 获赞 9 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/heguangsui123/article/details/100132057
今日推荐