如何仅克隆Git存储库的子目录?

送分小仙女□ 提交于 2020-08-11 15:55:01

问题:

I have my Git repository which, at the root, has two sub directories: 我有我的Git存储库,它的根目录有两个子目录:

/finisht
/static

When this was in SVN , /finisht was checked out in one place, while /static was checked out elsewhere, like so: SVN中时/finisht在一个位置检出,而/static在其他地方检出,如下所示:

svn co svn+ssh://admin@domain.com/home/admin/repos/finisht/static static

Is there a way to do this with Git? 有没有办法用Git做到这一点?


解决方案:

参考一: https://stackoom.com/question/2W6h/如何仅克隆Git存储库的子目录
参考二: https://oldbug.net/q/2W6h/How-do-I-clone-a-subdirectory-only-of-a-Git-repository
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!