Re: question about git-submodule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 03, 2007 at 07:01:38PM -0400, Eran Tromer wrote:
> $ mkdir super
> $ cd super
> $ git init
> $ git submodule add ../sub-to-be sub

You probably don't want to do this as this URL
probably won't work for anyone who wants to clone
your superproject.

> BTW, is there any easy way to create a submodule directly inside the
> supermodule's working tree, instead of cloning it as in the above example?

Do you want to use the submodule porcelain or just the plumbing?
If you simply want to add a submodule locally, "git add" will do that for
you just fine.  It's only when you want to make it easier for people who
clone your superproject to get updates of the submodules that you
should set up the information required by "git submodule" in .gitmodules
(see end of module_add in git-submodule.sh).

Note that the "url" can be set directly in your git config
(without specifying it in .gitmodules), but then anyone who clones
from you will have to modify his config "manually" too.
For some reason, the "path" element is required, even if it is equal
to the submodule name.

skimo
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux