threads / discuss / 20123

How to manage multiple personal projects

Subject: How to manage multiple personal projects

## tl;dr

3 messages between Jul 15, 2009 and Jul 15, 2009.

replies: 2people: 3as markdown or json

Paul Richards· Jul 15, 2009, 16:00 UTC · lore

Hi, I am currently using Subversion for my personal projects but am very interested in moving to a DVCS (most likely Git). The only reservation I have is that I'm not sure how to map my current workflow to Git.

Currently I have a single Subversion repository which holds all of my work. Typically when I experiment with something new I create a directory at the top level of my repository, and start hacking away. 9 times out of 10 these experiments run for a few days then are never touched again. The directory will just sit there forever more in my repository. Occasionally one of these "projects" will keep me interested for a while longer and so it will grow into something that I work on for a longer period and I might publish. Publishing a URL for a single project from my repository is very easy, as I can give a URL which points to just the correct directory within the repository. The third party doesn't see all my other junk unless they explicitly navigate up the URL, nor do they end up checking out lots of stuff related to other projects.

In short, with Subversion a single repository can hold multiple projects very easily for me. I myself typically just check out my entire repository, but when I send links to others I typically only send them the URL for the project of interest.

With Git, I'm not sure how this would work. From what I understand about branches and tags in Git is that they apply to the whole repository. And so it would not be advisable to store multiple projects in a single repository. I could choose to ignore this, and store all my small projects in a single Git repository anyway, but I'm not sure how I'd then allow others to checkout just a single project directory. (I presume they wouldn't be able to)

I believe the correct choice with Git is to create a repository per project. This would work OK for me, but I worry about the shear number of repositories I'd end up creating. Part of the nice thing with my current Subversion setup is that starting a new project is very easy and cheap, I don't create a new repository each time.

I think what might work with Git (and for which I'd like some advice) is something inbetween. I could have a single Git repository to hold my small experiment projects where initially is where I always start my work by creating a new directory. Then if any of them start to mature, I could move the project out into it's own repository for real. Would Git support this in some way tracking changes from one repo to the other? Or would I end up having to "replay" all the commits from one repo to the other?

Thanks for reading so far, I'd appreciate any advice people have for this.

My Subersion repository is (temporarily) available publicly: http://pauldoo.dyndns.org/svn/

Hopefully you might see how small many of these little projects are. Occasionally though they grow into something larger that I do publish (e.g. Proffy, Pigeon, Tuner).

-- 
Paul Richards
Avery Pennarun· Jul 15, 2009, 16:39 UTC · re: Paul Richards · lore

Re: How to manage multiple personal projects

On Wed, Jul 15, 2009 at 12:00 PM, Paul Richards<paul.richards@gmail.com> wrote:
Show 5 quoted lines
> I believe the correct choice with Git is to create a repository per
> project.  This would work OK for me, but I worry about the shear
> number of repositories I'd end up creating.  Part of the nice thing
> with my current Subversion setup is that starting a new project is
> very easy and cheap, I don't create a new repository each time.

Creating the repository for a git project is astonishingly cheap, because the initial repository exists inside the source tree of the project itself. So you don't even have to decide in advance what to name your project. I'd say this is even easier than creating a new svn directory.

You could then decide to publish your project (and go through a couple of steps to do so) only if it's important enough. Also, if you use something like github.com, this part is really easy - and someone else will pay the bandwidth costs.

Show 8 quoted lines
> I think what might work with Git (and for which I'd like some advice)
> is something inbetween.  I could have a single Git repository to hold
> my small experiment projects where initially is where I always start
> my work by creating a new directory.  Then if any of them start to
> mature, I could move the project out into it's own repository for
> real.  Would Git support this in some way tracking changes from one
> repo to the other?  Or would I end up having to "replay" all the
> commits from one repo to the other?

Although I definitely recommend just making one git repo per project in your case, you *could* do exactly what you describe above using git-subtree: http://github.com/apenwarr/git-subtree. Disclosure: I wrote git-subtree, so I like it by default.

However, doing this would only really be useful if your projects cross-reference each other in some way. My main motivation for writing git-subtree, for example, is that I often end up building useful tools that grow inside one of my other projects, then turn out to be good on their own (or as part of another project). So it's not that I kept unrelated projects together for convenience (because it really isn't any more or less convenient in git), but rather that I wasn't able to predict the future, and git-subtree lets me change my mind.

Have fun,
Avery
Jakub Narebski· Jul 15, 2009, 17:45 UTC · re: Paul Richards · lore

Re: How to manage multiple personal projects

Paul Richards <paul.richards@gmail.com> writes:
[...]
Show 5 quoted lines
> I believe the correct choice with Git is to create a repository per
> project.  This would work OK for me, but I worry about the shear
> number of repositories I'd end up creating.  Part of the nice thing
> with my current Subversion setup is that starting a new project is
> very easy and cheap, I don't create a new repository each time.
[...]
Perhaps 'repo' tool developed by Google will be what you want?
  http://android.git.kernel.org/?p=tools/repo.git
  http://newblogtopic.blogspot.com/2008/11/gerrit-and-repo-android-source_04.html 
-- 
Jakub Narebski
Poland
ShadeHawk on #git

← back to recent threads