9

I have about 8 submodules in my project (/modules/..) and some of them are not fully checking out. In other words, when I run

git submodule init
git submodule update

Some of the submodule directories do not contain the all the files. My first thought was that I might be on a diffenet commit or something. But when I check the latest project commit - and then check the current commit of the submodule they are the same.

git submodule status

How do I get git to pull ALL the submodule files when it loads the submodules? Or rather, how is it possible that I'm only receiving some of the files when I create the submodule folder?

My project structure looks like this:

/project
/modules
  /submodule1
  /submodule2
  /etc...
Xeoncross
  • 4,432
  • 9
  • 36
  • 48

2 Answers2

10

I still don't know what the deal is. But I deleted the submodule folders and ran

git submodule update

to re-checkout a copy of the submodules and fix the missing files.

Xeoncross
  • 4,432
  • 9
  • 36
  • 48
  • Does not work for me. Some submodules are missing. `.git/config` does not contain these modules and they are not in `.git/modules` – Black Feb 17 '20 at 14:49
0

If the submodule is not being pulled make sure you have added.

For example:

git submodule add https://github.com/chaconinc/DbConnector

I had the same issue and after running the above command it worked.

alexia
  • 1