Re: [PATCH] User Manual: add a chapter for submodules
- From
- Sven Verdoolaege <skimo@kotnet.org>
- Date
- Sep 19, 2007, 21:00 UTC
- Message-ID
- <20070919210022.GJ3619MdfPADPa@greensroom.kotnet.org>
- In-Reply-To
- <20070919174250.GC16235@genesis.frugalware.org>
On Wed, Sep 19, 2007 at 07:42:50PM +0200, Miklos Vajna wrote:
> +Submodules maintain their own identity; the submodule support just stores the > +submodule repository location and commit ID, so other developers who clone the > +superproject can easily clone all the submodules at the same revision.
[..]
Show 12 quoted lines
> +------------------------------------------------- > +$ mkdir super > +$ cd super > +$ git init > +$ echo hi > super.txt > +$ git add super.txt > +$ git commit -m "Initial commit of empty superproject" > +$ for i in a b c d > +do > + git submodule add ~/git/$i > +done > +-------------------------------------------------
You may want to warn the reader not to use local URLs here if they plan to publish their superproject.
> +It's not safe to run `git submodule update` if you've made changes within a > +submodule. They will be silently overwritten:
This is only true if they didn't follow your advise of checking out a branch first.
skimo