Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 创建子存储库并将其插入主项目_Git_Github_Repository - Fatal编程技术网

Git 创建子存储库并将其插入主项目

Git 创建子存储库并将其插入主项目,git,github,repository,Git,Github,Repository,我对git非常陌生,我通过gitHub使用它,我想知道是否有一种方法可以创建一个子存储库,然后将其包含在主存储库中。 例如,如果我有一个带有模块的库,我希望其中的一些模块能够独立存在于存储库中,并具有git提供的问题和所有功能,但同时我希望它们能够包含在库repo中。 我该怎么做呢?我想你在找我 基本上,您提到的每个库都将作为子模块添加。每个这样的子模块都有一个自己的存储库,主存储库将通过.gitmodules文件中的条目引用它 正如@Chris在下面的评论中提到的,您可能也想这样做。也许是您正

我对git非常陌生,我通过gitHub使用它,我想知道是否有一种方法可以创建一个子存储库,然后将其包含在主存储库中。 例如,如果我有一个带有模块的库,我希望其中的一些模块能够独立存在于存储库中,并具有git提供的问题和所有功能,但同时我希望它们能够包含在库repo中。
我该怎么做呢?

我想你在找我

基本上,您提到的每个库都将作为子模块添加。每个这样的子模块都有一个自己的存储库,主存储库将通过
.gitmodules
文件中的条目引用它


正如@Chris在下面的评论中提到的,您可能也想这样做。

也许是您正在寻找的功能?子模块确实是一个不错的选择。许多用户更喜欢,而且它们也值得一看。有没有办法通过gitHub进行配置,或者我应该下载git shell?@Phate01您可以使用,它预装了git for windows。我不确定是否使用
github
工具来配置它。