1

I created some repository in Git and added repos as submodules.

In the submodule repo i added contents.( folders and files).After that i did

git add -A
git commit -m "message"
git push origin master.

After that i tried to clone the repo from some other place. I am able to clone the repo and I can see all the folders.But some folders are empty.

How to resolve this issue?

CharlesB
  • 86,532
  • 28
  • 194
  • 218
user1722227
  • 21
  • 1
  • 7

1 Answers1

0

Pushing the changes in the submodule isn't enough.

You need to go back to the parent repo, commit and push as well.
Otherwise, pulling from the parent repo will pull the last SHA1 it know of the submodule (recorded in the .gitmodules file and its special entry as in "Nested git repositories without submodules?"), and that would be one of an empty sub-repo.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250