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.

  • will creating a git branch delete my local changes
  • Pull remote branch into local repo with different name?
  • How to get Docker to run on a Windows System behind a corporate firewall?
  • When pushing branches and tags, get error: cannot spawn git: no such file or directory
  • git ignore specific directories
  • Single or Multiple Git repositories for libraries shared between teams
  • 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?

  • git - confusion over terminology, “theirs” vs “mine”
  • git push and distributed workflows
  • Getting a fatal error in git for multiple stage entries
  • How to incorporate WordPress automatic updates with Git as version control?
  • Why isn't this merge fast-forwarded?
  • What should I know about Git before I start using it?
  • 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.

    green folder

    Git Baby is a git and github fan, let's start git clone.