Re: Notes on Using Git with Subprojects

From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Date: 2006-09-27 19:55:22
Hi,

On Wed, 27 Sep 2006, Martin Waitz wrote:

> On Tue, Sep 26, 2006 at 03:33:49PM -0700, A Large Angry SCM wrote:
> > So, for each subproject of a parent project, you want to record branch, 
> > version (commit ID), and directory location. Not quite as easy to do in 
> > a makefile but do-able.
> 
> I've been playing with this kind of subprojects a little bit.
> 
> 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.

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.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Sep 27 21:33:26 2006

This archive was generated by hypermail 2.1.8 : 2006-09-27 21:35:20 EST