Subject: Re: Looking for SCM that lets me publish part of a repository

From: Shawn Pearce <[email-masked]>
Date: Sun, 5 Mar 2006 20:48:30 -0500

Matt McCutchen <[email-masked]> wrote:
> For the last week or so, I have been looking for a SCM system to hold
> many of my projects, some of which are available to the public and
> others of which are not.  It would be nice if I could use a single large
> private repository on my computer with each project in a separate
> folder.  Then I would like to pull some of the projects (but not all)
> into a world-readable repository on my Web site.  I have looked at
> several SCMs and have not found a way to make any of them do this, but I
> like GIT best on other grounds.  Is there a way I can coerce GIT to
> clone and pull one folder out of a repository but ignore the rest?

No.  And actually this is probably not the best way to use GIT.

If you want to segment your work into ``public'' and ``non-public''
then you should at least segment your work into two repositories:
``public'' and ``non-public''.  But you really should segment your
repository to a project-by-project basis.  That is each project
should have its own repository.

That said if there are many files which will have identical content
across many projects you may be able to save disk space by placing
all objects into a single object directory; but that's entirely
independent of project organization.

Unlike CVS, Subversions, etc. GIT repositories are dirt-cheap to
create.  Don't think twice about creating a different repository
for a new project.  I think I'm up on about 50 repositories at
this point; however each one is typically less than a megabyte in
total size.

-- 
Shawn.