相关疑难解决方法(0)

Git子模块.拉入超级项目的新克隆

好.所以我以为我有这个舔...但现在....

我有一个项目,其中包括一个来自GitHub的小型库作为子模块.在该超级项目的原始版本中,子模块按预期工作.

但是,我只是克隆了超级项目,做了我认为应该做的事情:"git submodule init",得到子模块的目录,但它是空的.

如果我现在尝试做

git submodule update
Run Code Online (Sandbox Code Playgroud)

我明白了

fatal: Needed a single revision 
Unable to find current revision in submodule path 'external_libraries/BEACHhtml'
Run Code Online (Sandbox Code Playgroud)

如果我试试

git submodule foreach git pull
Run Code Online (Sandbox Code Playgroud)

我明白了

Entering 'external_libraries/BEACHhtml'
fatal: Where do you want to fetch from today?
Stopping at 'external_libraries/BEACHhtml'; script returned non-zero status.
Run Code Online (Sandbox Code Playgroud)

在我的.git/config中,我有这个:

[submodule "external_libraries/BEACHhtml"]
    url = git@github.com:interstar/BEACHhtml.git
Run Code Online (Sandbox Code Playgroud)

在我的.gitmodules中我有这个:

[submodule "external_libraries/BEACHhtml"]
path = external_libraries/BEACHhtml
url = git@github.com:interstar/BEACHhtml.git
Run Code Online (Sandbox Code Playgroud)

任何人都知道缺少什么?

git git-submodules

85
推荐指数
2
解决办法
6万
查看次数

标签 统计

git ×1

git-submodules ×1