9

So I've got my private SVN repo on my home server, and it has maybe 30 different modules thrown together in it, ranging from abortive throw-away larks to a few endeavors that might actually go somewhere someday. But a recent filesystem failure (BTW, never ever EVER use XFS without a battery-backed hardware RAID) has me spooked and thinking of using a DVCS for all that. I've also just had quite the swig of the Git koolaid, and I've been working with GitHub of late, so that's where I'm looking right now.

Of course, it would be silly to shell out major cash for a separate private Git repo for every little project, and I don't want to have to be selective about what I throw up there (I love all my children :-D ), so I'll have to be somewhat creative about this. I can happily use SSH to my home box to use Git the way I've been using SVN, and I'm thinking from there I could amalgamate everything into, say, a big project with 30 submodules, which I then push to GitHub. What'd be a sane way to set this up? Does using submodules sound feasible? How do I sync it all to my private GitHub repo? Cron job? Git hook? I'd love to hear it if anyone's done something similar.

I'm not really married to Git or GitHub, so a sufficiently compelling feature of another solution might sway me. But if your answer does involve a different system (especially a different VCS), be advised it'll be a tougher sell :-)

Luke Maurer
  • 7,845
  • 2
  • 24
  • 24

6 Answers6

11

Bitbucket now supports Git repositories, and it lets you store private repositories for free.

compman
  • 2,174
  • 2
  • 18
  • 26
6

You can use Dropbox to store personal git repos. They give you 2GB of space for free and have plans that go way up from there. That way you can have repos for each project and it's automatically backed up in the event that your local drive crashes.

I answered another question on how to set up git and dropbox, which should get you started.

Community
  • 1
  • 1
Dan McNevin
  • 22,278
  • 5
  • 35
  • 28
  • 1
    Aha! Excellent … I was thinking of getting a Dropbox going for another purpose (another Stack Overflow answer, CTTOI :-D ), so maybe I should kill at a 2:1 bird-to-stone ratio. Thanks! – Luke Maurer Jun 06 '10 at 23:38
  • 3
    I highly, HIGHLY advise against this. Dropbox is great for syncing files, but when conflicts occur it can mess up the .git repo. Not to mention if operations are conducted on an "out of sync" repo in dropbox. You shouldn't ever have to question if your repo is "in sync" in Dropbox or if conflicted copies ever occur. If you need private repos, I suggest https://bitbucket.org/ where you can have UNLIMITED private repos with the restriction of only allowing up to 5 developers have access to them. Dropbox + Git, just don't do it. See also: http://stackoverflow.com/a/1967038/169153 – Urda Sep 05 '13 at 22:57
2

For the same price or less than a GitHub plan, you could get a web host or even a virtual private server and run your own source control system with unlimited repositories.

Jeff
  • 21,744
  • 6
  • 51
  • 55
  • 1
    Eh. GitHub plans start at $7/mo, and I wouldn't have to administer it myself … – Luke Maurer Jun 06 '10 at 04:52
  • Yeah, $7 is for 5 private repos though. So my answer is really intended for the case where you might want to go with 30+ separate private repos, in which situation it'd make sense to run your own git server. – Jeff Jun 06 '10 at 04:58
  • True. But if I can hack something like this together, it might be simpler than having to rely on my own admin skills — I'm a coder, not an admin :-) That said, maybe I should give that alternative more thought … any suggestion as to what Git server to use in that case? – Luke Maurer Jun 06 '10 at 05:04
  • Time spent on administration is definitely something to consider. As for me, I use WebFaction for web hosting. It happens to be very easy to set up a private subversion repository on there and serve it over http, so now I basically have all the svn repositories I want at no extra cost. Unfortunately, I don't have any experience with git beyond GitHub, so I wouldn't be able to help with how to configure your own git repository. – Jeff Jun 06 '10 at 05:25
2

Do you need to have your repositories hosted? Why? If what you want is to back up your repositories then you can also use, say, a simple USB thumbdrive. All you need to do is create a bare repository on the device for each of your repositories, add a remote for each of your repositories, and push.

A 1Gb thumbdrive is probably well more than what you need. That's less than 10 dollars. It should take you less than 5 minutes to bang out the Bash script to push the repositories. If one hour of your time costs $64 then the script will cost you just over 5 dollars. All in all, less than $20: surely not "major cash". :p

wilhelmtell
  • 57,473
  • 20
  • 96
  • 131
  • Hrm … well, maybe not, I guess. \*mull mull mull\* (I'm way too junior to be making $64/hr, BTW … my time isn't *that* valuable :-) ) – Luke Maurer Jun 06 '10 at 23:35
2

http://www.assembla.com provides free private git/svn/hg repositories. There is no limit on the number of users (bitbucket has a limit of 5 users). AFAIK, the only limit is 1 GB space for the free account. Also, free accounts don't have tools such as ticket management, wiki, etc (but you certainly don't need those).

François
  • 7,988
  • 2
  • 21
  • 17
0

More recently there's this option gitlab

maco1717
  • 823
  • 10
  • 26