Re: Submodules
- From
- Sven Verdoolaege <skimo@kotnet.org>
- Date
- Aug 8, 2007, 10:41 UTC
- Message-ID
- <20070808104117.GK999MdfPADPa@greensroom.kotnet.org>
- In-Reply-To
- <a1bbc6950708071631w5d232e92gd0fa27158b27b5c3@mail.gmail.com>
On Tue, Aug 07, 2007 at 04:31:57PM -0700, Dmitry Kakurin wrote:
> This is exactly the level of details I'm talking about: > * how come sumbodules are not initialized when I do a clone of super.
See you second question.
> I expect to be able to build super after I clone it. Is there a new > (undocumented) flag to clone?
Not (yet). Right now, you have to do
git submodule init git submodule update
after you clone to fetch and check-out all (first-level) submodules.
> * is it OK to *not* init a submodule? will super become unhappy? Can I > do commits to super in this case?
Yes. No. Yes. In fact, only the "git submodule" subcommand are affected by a "git submodule init". Doing a "git submodule update" will actually check out the submodules and from then on, the HEAD of this checked-out submodule will be considered the content of the submodule in the working tree of the supermodule.
> * why submodules should be listed in 2 places: in .submodules and in > super/.git/config?
It only has to be specified in .git/config. The value in .gitmodules (if present) is used by "git submodule init" as a default value for the one in .git/config.
skimo