{"thread":{"id":"20123","subject":"How to manage multiple personal projects","startedAt":"2009-07-15T16:00:41Z","lastAt":"2009-07-15T17:45:32Z","messageCount":3,"participants":["Paul Richards","Avery Pennarun","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"118035","messageId":"a1138db30907150900j7d6152ebs755d83adf7717287@mail.gmail.com","threadId":"20123","inReplyTo":null,"subject":"How to manage multiple personal projects","fromName":"Paul Richards","fromEmail":"paul.richards@gmail.com","sentAt":"2009-07-15T16:00:41Z","receivedAt":"2009-07-15T16:00:41Z","isPatch":false,"sender":{"key":"paul.richards@gmail.com","avatar":"https://gravatar.com/avatar/79ad1fd7cbf40f3c342e4f2586a69ecde83b3f05804639cbc709a812d47613d1?d=mp&s=160"},"body":"Hi,\nI am currently using Subversion for my personal projects but am very\ninterested in moving to a DVCS (most likely Git).  The only\nreservation I have is that I'm not sure how to map my current workflow\nto Git.\n\nCurrently I have a single Subversion repository which holds all of my\nwork.  Typically when I experiment with something new I create a\ndirectory at the top level of my repository, and start hacking away.\n9 times out of 10 these experiments run for a few days then are never\ntouched again.  The directory will just sit there forever more in my\nrepository.  Occasionally one of these \"projects\" will keep me\ninterested for a while longer and so it will grow into something that\nI work on for a longer period and I might publish. Publishing a URL\nfor a single project from my repository is very easy, as I can give a\nURL which points to just the correct directory within the repository.\nThe third party doesn't see all my other junk unless they explicitly\nnavigate up the URL, nor do they end up checking out lots of stuff\nrelated to other projects.\n\nIn short, with Subversion a single repository can hold multiple\nprojects very easily for me.  I myself typically just check out my\nentire repository, but when I send links to others I typically only\nsend them the URL for the project of interest.\n\nWith Git, I'm not sure how this would work.  From what I understand\nabout branches and tags in Git is that they apply to the whole\nrepository.  And so it would not be advisable to store multiple\nprojects in a single repository.  I could choose to ignore this, and\nstore all my small projects in a single Git repository anyway, but I'm\nnot sure how I'd then allow others to checkout just a single project\ndirectory.  (I presume they wouldn't be able to)\n\nI believe the correct choice with Git is to create a repository per\nproject.  This would work OK for me, but I worry about the shear\nnumber of repositories I'd end up creating.  Part of the nice thing\nwith my current Subversion setup is that starting a new project is\nvery easy and cheap, I don't create a new repository each time.\n\nI think what might work with Git (and for which I'd like some advice)\nis something inbetween.  I could have a single Git repository to hold\nmy small experiment projects where initially is where I always start\nmy work by creating a new directory.  Then if any of them start to\nmature, I could move the project out into it's own repository for\nreal.  Would Git support this in some way tracking changes from one\nrepo to the other?  Or would I end up having to \"replay\" all the\ncommits from one repo to the other?\n\nThanks for reading so far, I'd appreciate any advice people have for this.\n\nMy Subersion repository is (temporarily) available publicly:\nhttp://pauldoo.dyndns.org/svn/\n\nHopefully you might see how small many of these little projects are.\nOccasionally though they grow into something larger that I do publish\n(e.g. Proffy, Pigeon, Tuner).\n\n-- \nPaul Richards\n"},{"id":"118038","messageId":"32541b130907150939w563eeb63ib850513c93d35c2c@mail.gmail.com","threadId":"20123","inReplyTo":"a1138db30907150900j7d6152ebs755d83adf7717287@mail.gmail.com","subject":"Re: How to manage multiple personal projects","fromName":"Avery Pennarun","fromEmail":"apenwarr@gmail.com","sentAt":"2009-07-15T16:39:11Z","receivedAt":"2009-07-15T16:39:11Z","isPatch":false,"sender":{"key":"apenwarr@gmail.com","avatar":"https://avatars.githubusercontent.com/u/20592?v=4"},"body":"On Wed, Jul 15, 2009 at 12:00 PM, Paul Richards<paul.richards@gmail.com> wrote:\n> I believe the correct choice with Git is to create a repository per\n> project.  This would work OK for me, but I worry about the shear\n> number of repositories I'd end up creating.  Part of the nice thing\n> with my current Subversion setup is that starting a new project is\n> very easy and cheap, I don't create a new repository each time.\n\nCreating the repository for a git project is astonishingly cheap,\nbecause the initial repository exists inside the source tree of the\nproject itself.  So you don't even have to decide in advance what to\nname your project.  I'd say this is even easier than creating a new\nsvn directory.\n\nYou could then decide to publish your project (and go through a couple\nof steps to do so) only if it's important enough.  Also, if you use\nsomething like github.com, this part is really easy - and someone else\nwill pay the bandwidth costs.\n\n> I think what might work with Git (and for which I'd like some advice)\n> is something inbetween.  I could have a single Git repository to hold\n> my small experiment projects where initially is where I always start\n> my work by creating a new directory.  Then if any of them start to\n> mature, I could move the project out into it's own repository for\n> real.  Would Git support this in some way tracking changes from one\n> repo to the other?  Or would I end up having to \"replay\" all the\n> commits from one repo to the other?\n\nAlthough I definitely recommend just making one git repo per project\nin your case, you *could* do exactly what you describe above using\ngit-subtree:  http://github.com/apenwarr/git-subtree.  Disclosure: I\nwrote git-subtree, so I like it by default.\n\nHowever, doing this would only really be useful if your projects\ncross-reference each other in some way.  My main motivation for\nwriting git-subtree, for example, is that I often end up building\nuseful tools that grow inside one of my other projects, then turn out\nto be good on their own (or as part of another project).  So it's not\nthat I kept unrelated projects together for convenience (because it\nreally isn't any more or less convenient in git), but rather that I\nwasn't able to predict the future, and git-subtree lets me change my\nmind.\n\nHave fun,\n\nAvery\n"},{"id":"118039","messageId":"m3ws69u9g0.fsf@localhost.localdomain","threadId":"20123","inReplyTo":"a1138db30907150900j7d6152ebs755d83adf7717287@mail.gmail.com","subject":"Re: How to manage multiple personal projects","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-07-15T17:45:32Z","receivedAt":"2009-07-15T17:45:32Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Paul Richards <paul.richards@gmail.com> writes:\n\n[...]\n> I believe the correct choice with Git is to create a repository per\n> project.  This would work OK for me, but I worry about the shear\n> number of repositories I'd end up creating.  Part of the nice thing\n> with my current Subversion setup is that starting a new project is\n> very easy and cheap, I don't create a new repository each time.\n[...]\n\nPerhaps 'repo' tool developed by Google will be what you want?\n\n  http://android.git.kernel.org/?p=tools/repo.git\n  http://newblogtopic.blogspot.com/2008/11/gerrit-and-repo-android-source_04.html \n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"}]}