David Eyk David Eyk - 1 year ago 167
Git Question

Git will not init/sync/update new submodules

Here's part of the contents of my


[submodule "src/static_management"]
path = src/static_management
url = git://github.com/eykd/django-static-management.git
[submodule "external/pyfacebook"]
path = external/pyfacebook
url = http://github.com/sciyoshi/pyfacebook.git

only contains the first:

[submodule "src/static_management"]
url = git://github.com/eykd/django-static-management.git

The second submodule (
) was added by another developer in a feature branch. I've inherited the development now, and have checked out the feature branch. However, Git will not pull the submodule for me. I've tried:

  • git submodule init

  • git submodule update

  • git submodule update --init

  • git submodule sync

  • Removing all submodule definitions from
    and running
    git submodule init
    . It only copies over the previously existing submodule and ignores the new one.

  • Entering new submodule definitions in
    manually and running
    git submodule update
    . Only the previously existing submodules bother to update.

in various combinations, but git simply will not update
based on the new contents of
, nor will it create the
folder and pull the submodule's contents.

What am I missing? Is manual intervention (adding a submodule entry by hand to
) truly required, and why?

Edit: Manual intervention does not work. Manually adding the new submodule entry to
doesn't do a thing. The new submodule is ignored.

Answer Source

Did you recently upgrade to git version ? I did and am now having similar issues...

Edit: I fixed my problem but have absolutely no idea whatsoever where the problem was. I manually removed submodule entries from both .git/config and .gitmodules and re-added my submodules with the ususal steps (git submodule add etc...) ... Worksforme but adds no value to this thread.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download