最近想git clone 一个项目的说明下来,这个项目说明又分为两种语言的,如图

但是我只想clone en version to my local repository
看了下stackover flow
/////////////////////////////////////////////////////////////////////////////////////////////////////
EDIT: As of Git 2.19, this is finally possible, as can be seen in this answer: https://stackoverflow.com/a/52269934/2988.
Consider upvoting that answer.
Note: in Git 2.19, only client-side support is implemented, server-side support is still missing, so it only works when cloning local repositories. Also note that large Git hosters, e.g. GitHub, don't actually use the Git server, they use their own implementation, so even if support shows up in the Git server, it does not automatically mean that it works on Git hosters. (OTOH, since they don't use the Git server, they could implement it faster in their own implementations before it shows up in Git server.)
No, that's not possible in Git.
Implementing something like this in Git would be a substantial effort and it would mean that the integrity of the clientside repository could no longer be guaranteed. If you are interested, search for discussions on "sparse clone" and "sparse fetch" on the git mailinglist.
In general, the consensus in the Git community is that if you have several directories that are always checked out independently, then these are really two different projects and should live in two different repositories. You can glue them back together using Git Submodules.
说了那么多,我不太懂他的clientside 反正这个高赞回答是说不可以,而且建议每个项目分开然后再用git submodules 的方式去粘合起来。
然后后面还有介绍了其他很多方法的,但是这个不重要
https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository
下面的都是git server都是自己initailize 的但是github的server 的implementation不清楚
不过我之前有看过想multigit这种东西。
本文探讨了如何仅克隆Git仓库的一个子目录。虽然Git官方并不支持直接克隆子目录,但提到了Git 2.19版本开始实现的部分支持。文章建议使用Git子模块或者按照Stack Overflow上的建议来处理这种情况。作者提到了GitHub可能不支持Git服务器的某些功能,因此推荐关注sparse clone和sparse fetch的相关讨论。
5202

被折叠的 条评论
为什么被折叠?



