子模块的.git文件夹

Bri*_*ang 7 git github

在一个版本的git中,我们有(git版本1.7.4.4):

ProjectRoot/.git/modules/SubmoduleX/config
Run Code Online (Sandbox Code Playgroud)

但是在另一台计算机中我们有(git版本1.7.12.4 (Apple Git-37)):

ProjectRoot/SubmoduleX/.git/config
Run Code Online (Sandbox Code Playgroud)

为什么会出现差异?这个改变什么时候完成的?

man*_*lds 11

你有相反的版本?

这一变化引入了1.7.8:

当使用"git submodule init"填充新的子模块目录时,子模块的$ GIT_DIR元信息目录在超级项目的$ GIT_DIR/modules //目录中创建,并通过gitfile机制引用.这样就可以在没有重新克隆的情况下在超级项目中提交和在树中没有子模块的提交之间进行切换.

https://github.com/git/git/blob/master/Documentation/RelNotes/1.7.8.txt