I've been using SVN for sometime and have been making an awkward, but soon to be rewarding transition over to git.

Theres quite a few side / small projects that I'm working on which 90% will never see the light of day. As well - I also have my weekly school assignments / projects, and finally client projects that I have on the go.

I've been rolling the idea or question of how or what the best way would be to back up my projects.

The solutions I've sought out so far:

github which offers an outstanding service - I'm ok with my work being open source, however It's the school work and client work I might not want the public to be open to. github, of course has a payment plan - but let's face it, im a poor colleage student doing what I can to at least put KD on the table!

Theres the USB thumbstick that I can take around with me, work off of or back up, but that requires it to be around constently.

Theres Dropbox, but thats a little overkill since it already is a form of a version control system, as well - I have quite a few things on the go - putting everything within dropbox would eat a lot of space

Finally, theres a private server. I have a mac mini setup as a media server and I was thinking that I could backup to that.

Anyways - what are your guys thoughts, how do you handle backing up projects, not only for version control but for the everyday backups.

  • 1
    It should be noted that GitHub now offers a free, small number of private repos for those of us with .edu email addresses.
    – Fomite
    Jan 10, 2013 at 2:42
  • 1
    Github and Dropbox have the bonus of being physically on a different location. A fire in your place might very well destroy any backups that you keep there.
    – scarfridge
    Jan 10, 2013 at 15:04

6 Answers 6


If you have a private server with ssh access all you need to do is this:

ssh my.server
mkdir ~/repo.git && cd ~/repo.git
git init --bare # bare repository that will serve as backup location
# back on your box
cd $my_local_git_repo
git remote add --mirror backup ssh://my_server:repo.git
git config remote.backup.fetch ":" # don't replace our data when
                                   # accidentally fetching from backup
git push backup # copy everything new to backup repo
  • +1 I was looking for something like this. What about user name and user directory in conjunction with the ssh? Oct 2, 2010 at 12:59
  • I think ssh will take you current username as default when logging in and then start from home directory on the remote machine, but you can certainly use paths like ssh://[email protected]/~username/repo.git or ssh://[email protected]/some/absolute/path/repo.git.
    – che
    Oct 2, 2010 at 13:06
  • +1, been doing this for two years on Git (and several on Subversion/CVS before that) and it's a breeze.
    – l0b0
    Jan 5, 2012 at 14:25
  • Great hints! +1. That's exactly what I was looking for. I have my home server just set up (with ssh) and I am going to try out git. Up to now I have been using a USB stick, which is also a great solution if you do not have access to your server.
    – Giorgio
    Jan 10, 2013 at 15:58

This wasn't the case at the time when this question was asked, but now Bitbucket also supports Git repositories (in addition to Mercurial).
For free, you get an unlimited number of public and private repositories. The only limitation is that no more than five users can access your private repositories. There are other plans that cost actual money and allow more users, but for you the free plan should be sufficient.

Concerning backups:
I have my own stuff on Bitbucket as well, and I backup everything to my local machine frequently (and to USB disks from there).
I didn't find a tool for automatically pulling all my repositories from Bitbucket, so I wrote my own:
Bitbucket Backup (free & open source, but Windows only).


It all depends on what you want ( I didn't quite get it from the question ). Do you wish to backup your repos, or do you wish to host them somewhere?

I don't see nothing wrong with putting your repos in your Dropbox dir, and syncing them. There exists a portable Dropbox and a portable Git, for those machines that don't have them, and you don't wish to install them.

It depends on whether you want to have backup or an online repo, so to say. Note: there are other git hosting solutions, other than github - see here.


You keep saying "backup", so I'm assuming you don't want to code on the go, you just want to keep your files safe.

Personally, I just develop on my main PC with source control (and frequent commits), and back everything up to a flash drive every week or so. I don't see the need for more than that.


For $7 US per month, you can get a GitHub account that allows private repositories. At this price, you can nominate one collaborator for each such private repo. Excellent for tiny (one- or two-person) projects or for shoestring operations. There are other slightly more expensive plans that allow more collaborators. Open-source repos are free and unrestricted, even when you're on one of the payed service levels.


If you want a more github like experiance but on a private server you could setup Gitlab, which is a open souce github clone.

  • would you mind explaining more on what it does and why do you recommend it as answering the question asked? "Link-only answers" are not quite welcome at Stack Exchange
    – gnat
    Oct 12, 2013 at 20:26

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