Git submodules in .gitmodules not initialized
I opened a GitHub repo and wrote .gitmodules in GitHub web source editor. When I cloned the rpo, I found the submodules in .gitmodules are not being initialized.
- Apply commits from one git repository to subfolder of another repository
- git rebase fatal: Needed a single revision
- git: can pull but can't push
- Eclipse EGit auto commit/push
- Cannot install bower packages in my new ASP.NET application
- Github wrong username
I think I tried almost all commands possible, including update, init, update –init and so on. Is there a way to use current .gitmodules file, not submodules add?
One Solution collect form web for “Git submodules in .gitmodules not initialized”
Writing a submodule isn’t enough.
You should rather use
git submodule add: that will update your
.gitmodules file and create a special entry in the index (where you want that submodule to be loaded).
Then, when you push that to your upstream repo on GitHub, the project page will display those special entries as a green folder.