【发布时间】:2016-12-08 11:48:04
【问题描述】:
我想从引用的子模块中提取代码。我试过git submodule update --init,它什么也没做。
阅读后,我意识到这可能是因为我的 .git/config 文件没有设置。 我的 .git/config 不包含有关子模块的任何内容。
.git/config:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = ssh://ShubhamRathi@gerrit.opnfv.org:29418/opnfvdocs
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "gerrit"]
url = ssh://ShubhamRathi@gerrit.opnfv.org:29418/opnfvdocs.git
fetch = +refs/heads/*:refs/remotes/gerrit/*
[user]
email = shubhamiiitbackup@gmail.com
[branch "Testingdoc"]
remote = origin
merge = refs/heads/master
但是我的 .gitmodule 包含对子模块的引用
[submodule "docs/testing/docs/submodules/apex"]
path = docs/testing/docs/submodules/apex
url = https://gerrit.opnfv.org/gerrit/apex
[submodule "docs/testing/docs/submodules/armband"]
path = docs/testing/docs/submodules/armband
url = https://gerrit.opnfv.org/gerrit/armband
我的问题是,我如何将这两个文件同步到git submodule update --init,相关存储库被拉起?
【问题讨论】:
标签: git git-submodules