views:

62

answers:

1

Here's part of the contents of my .gitmodules file:

[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

However, .git/config only contains the first:

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

The second submodule (external/pyfacebook) 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 .git/config and running git submodule init. It only copies over the previously existing submodule and ignores the new one.
  • Entering new submodule definitions in .git/config manually and running git submodule update. Only the previously existing submodules bother to update.

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

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

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

A: 

Did you recently upgrade to git version 1.7.0.4 ? 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.

Quickredfox
I'm up to 1.7.2 right now, but I believe that I've been having the problem since at least 1.6.x.
David Eyk
And yes, come to think of it, I ended up having to do as you describe (I forgot this question was still open!). If you don't mind polishing up your answer a bit, I'll accept it.
David Eyk