Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm in the process of setting up a GitHub account with the plan of making a pair of libraries I developed as parts of some recent iOS projects freely available for other iOS devs to use.

I don't currently have off-site backup for most of my code, so as part of this, I originally thought I would upload all of my personal projects, or at least all of my iOS projects, to a private GitHub-hosted repository. However, I have a lot of projects sitting around, many of which are fairly low-value (i.e., adapted from books and written for the learning experience). Not only does GitHub charge by the private repository, it doesn't seem to have any way of organizing repositories hierarchically.

Is there something I'm missing that would allow me to use a git repository with a hierarchy and check out pieces as I need them / work with them, the way I currently do with SVN?

Does GitHub (or a competitor, like BitBucket) have some project organization features that I'm missing?

Failing that, what's the generally accepted "git way" of handling this situation (discard projects not intended for release, store them offline, bundle them together somehow, etc., etc.)?

As far as I can tell, my options are:

  1. Put libraries on GitHub, continue hosting my own SVN for all other projects, use a non-VCS solution for off-site backup (blech),
  2. Put libraries and software I plan to release on GitHub (as public and private, respectively), continue hosting my own SVN for projects I don't care about as much and am only likely to revisit to refresh my memory on how to implement XYZ, decide that I'm willing to write them off if my house implodes (double blech),
  3. Put everything on [GitHub and/or BitBucket], deal with having some ridiculous number of repositories by searching for what I need / maintaining some offline set of pointers into my [GitHub and/or BitBucket] account (triple blech)
share|improve this question

1 Answer

bitbucket.org lets you create unlimited private repos.

Git does not let you check out just some pieces of code. So you would need to create a repo for each project, or deal with cloning all the projects. In reality I don't see a problem with putting all our small projects in a single repo. You clone it once and you are done.

With Git you don't ever have to "checkout" the code again unless you blow away your local repo or move to another machine. You'll just synchronize all your changes.

I have a simular issue with a large number of repositories. The reason I cannot store them all in a single repository is that I need to branch different versions off of each and every repository. It is very difficult to manage.

share|improve this answer
True, true... I probably shouldn't have called out GitHub specifically, since I'm open to using BitBucket for private projects. Edited the question slightly to make it less particular. – Arkaaito Aug 11 '12 at 3:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.