【发布时间】:2010-11-12 09:49:52
【问题描述】:
本题基于this thread。
我的 .gitmodules 在我家
[submodule "bin"]
path = bin
url = git://github.com/masi/bin.git
我家的文件夹结构:
~
|-- [drwxr-xr-x] bin // this is the folder which I make a submodule
// it is also a folder where I have a Git to push my submodule's files
| -- fileA
` -- folderA
...
我跑
git submodule init # I get no output from these commands
git submodule update
我跑
git submodule foreach git pull
我明白了
Entering 'bin'
fatal: Where do you want to fetch from today?
Stopping at 'bin'; script returned non-zero status.
我修复错误的第一个假设是将path = bin 更改为path = /Users/Masi/bin。但是,这并不能解决问题。
如何从我的 Git 中的子模块外部存储库上传内容?
【问题讨论】:
-
你的 bin 子模块的 .git/config 是什么样的?
-
@Charles:我的 .git/config 位于 stackoverflow.com/questions/1155095/…
-
看起来你的 bin 子模块是递归的??
-
@为什么你认为bin子模块是递归的?
-
如果您的 bin 子模块的
.git/config文件还包含[submodule "bin"]部分,则该子模块可能是递归的(即,它包含自身作为子模块)。这可能会导致很多混乱。
标签: git repository git-submodules git-pull