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?

1
  • did you also commit new submodule state in the superproject? Commented Feb 13, 2013 at 11:22

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.