使用 Github 处理多个分叉(和“子分叉”)的最佳方式是什么?
我的具体示例是 Silex 存储库。
因此,只需 https://github.com/fabpot/Silex/tree /master/vendor/Symfony/Component 部分与大量其他项目相关(全部在 symfony 帐户上)。
我知道我可以手动分叉它们中的每一个(但请注意,最后一个链接中 Symfony 上方的目录中还有其他供应商项目),然后克隆它们,设置上游并获取它。我想这可行吗?我不知道。
问题是,当我克隆 (git clone [email protected]/myusername/ proj.git)我并没有真正获得所有代码。这是我第一次真正想使用 github 将我的代码与其他项目相关联,但我没有这样做。
最好的方法是什么?非常感谢您的帮助,如有必要,我将详细说明。
My specific example is the Silex repository.
So, just the https://github.com/fabpot/Silex/tree/master/vendor/Symfony/Component part is relating to a ton of other projects (all on the symfony account).
I know that I could manually just fork each of them (but please notice that there's also other vendor projects in the directory above Symfony in last link) and then clone them, set the upstream and fetch it. I guess that could work? I don't know.
Thing is, when I clone (git clone [email protected]/myusername/proj.git) I don't really get all the code. It's the first time I actually want to use github relating my code to other projects and I'm failing to do so.
I followed the instructions at http://help.github.com/fork-a-repo/ but it just feels like I'm doing extra work than what I should be doing. I actually expected to just pull it from the Silex project and get all the code from all the sub-projects Silex is taking code from (in a recursive way, you could say), but it doesn't.
What's the best way to do so? Thanks a lot for the help and I will elaborate more if necessary.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所有带有绿色箭头的文件夹都是子模块。
当您克隆此存储库时,请尝试 git submodule update --init --recursive 。这会将所有子模块下载到位。
请注意,您还可以将
--recursive
选项添加到git clone
命令中以立即查看它们。All those folders with a green arrow are submodules.
When you cloned this repo, try
git submodule update --init --recursive
. That will download all the submodules in place.Note that you can also add the
--recursive
option to thegit clone
command to check them out immediately.