.git folder for Submodules

git, github

Solution

You have got the versions the other way around?

The change was introduced in `1.7.8`:

When populating a new submodule directory with "git submodule init", the $GIT_DIR metainformation directory for submodules is created inside $GIT_DIR/modules// directory of the superproject and referenced via the gitfile mechanism. This is to make it possible to switch between commits in the superproject that has and does not have the submodule in the tree without re-cloning.

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

Problem

In one version of git, we have (git version `1.7.4.4`): ``` ProjectRoot/.git/modules/SubmoduleX/config ``` However in another computer we have (git version `1.7.12.4 (Apple Git-37)`): ``` ProjectRoot/SubmoduleX/.git/config ``` Why the discrepancy? When was this change done?

Original source