Re: Notes on Using Git with Subprojects
- From
Martin Waitz <tali@admingilde.org>
- Date
- Sep 27, 2006, 11:38 UTC
- Message-ID
- <20060927113813.GC8056@admingilde.org>
- In-Reply-To
- <Pine.LNX.4.63.0609271152270.14200@wbgn013.biozentrum.uni-wuerzburg.de>
hoi :)
On Wed, Sep 27, 2006 at 11:55:22AM +0200, Johannes Schindelin wrote:
Show 10 quoted lines
> > My current approach is like this: > > > > * create a .gitmodules file which lists all the directories > > which contain a submodule. > > * the .git/refs/heads directory of the submodule gets stored in > > .gitmodule/<modulename> inside the parent project > > Taking this a step further, you could make subproject/.git/refs/heads a > symbolic link to .git/refs/heads/subproject, with the benefit that fsck > Just Works.
in fact it is done this way (more or less).
> Nevertheless, you have to take care of the fact that you need to commit > the state of the root project just after committing to any subproject.
why?
You can accumulate as many changes in different subprojects until you get to a state that is worth committing in the parent project. All these changes are then seen as one atomic change to the whole project.
-- Martin Waitz