I have a git repository with 3 submodules, like this:
foo/  # main repository
  bar1/  # submodule1
  bar2/  # submodule2
  bar3/  # submodule3
I've added the submodules directly after executing git init in the main repository:
git submodule add https://github.com/bar1.git bar1
...
The strange thing now is if I add a new directory like foo/test/ git does not track changes inside of foo/test/. Just changes directly inside of foo/ are tracked or changes to the submodules. Why is that?
It appears to me like git is treating foo/test like a submodule, while it is certainly not.
The .gitignore looks like this:
.idea/
...which basically only ignores the hidden IDE project-related dir.
.gitmodules looks like this:
[submodule "bar1"]
path = bar1
url = https://github.com/...
[submodule "bar2"] path = bar2 url = https://github.com/... [submodule "bar3"] path = bar3 url = https://github.com/...
Do I have to manually tell git that foo/test/ should remain inside of the main repository and that it is not a submodule?
 
    