GitHub is an amazing service for collaborative open-source development. Their pricing model is structured to encourage “social coding,” and provides unlimited open source repositories for free. Not only is that a smart method of easing entry into their service, but it also encourages the open source ethos of peer production. Win win all around.

However, if you’re an independent developer working on multiple, small scale projects that are not collaborative in nature, nor open source, then the advantages of hosting your repository on GitHub aren’t fully realized. If you’re really prolific, these repos can quickly pile up, pinning you against your plan’s private repository limit and forcing you to upgrade.

Until recently I had been hosting Tumblr themes on GitHub as private repositories. For the most part these aren’t actively maintained, but occasionally I’ll revisit the code to add a feature or fix a bug. Smooth sailing until I hit the private repository limit of my GitHub Micro plan. Seven bucks is cool with me, but twelve! Just to archive some code that I’ll touch maybe once a month?1 It didn’t really make sense for me to upgrade simply for additional storage (virtual hoarding?), so in an effort to avoid ascending the GitHub pricing ladder, I started looking into alternative solutions.

The great part about git is that it’s open source. No licensing or monthly fees there. Also, if you’re a web developer, chances are you already pay for hosting. And, if you’re a savvy web developer with a half-decent web host, git is probably already installed on your machine. I use and recommend Dreamhost, and after a quick Google search, I found a few resources detailing how to setup and configure git repositories using my shared Dreamhost server.2 It took a bit of time to get things running, but I now have my own git repository host setup on my account.

As I said earlier, this new setup works really well for an independent developer working on non-collaborative, private repositories. The projects I host on the Dreamhost server are smaller in size, don’t require the social services provided by GitHub, and require infrequent access once they’re deployed. Futhermore, it utilizes resources I already pay for.

Below is a shell script that you can use to automate the remote repository creation, once you’ve got the server configured.3 I have this script saved at /usr/local/bin/remgit which allows me to run it from the command line (make sure /usr/local/bin is in your $PATH).

To create a new git repository, I simply enter the local directory that will serve as the repo root, and run remgit in Terminal. Voilà, new git repo initialized, created on my Dreamhost server, and ready for development.


  1. It would be nice if GitHub adopted the Basecamp convention where archived projects are not counted against your plan limits. I would be more inclined to use GitHub as long-term codebase storage if this were the case.
  2. Hosting Git Repositories on Dreamhost by Craig Jolicoeur provides detailed instructions. I recommend following them through the GitWeb setup (optional step 4). My repository directory is configured as a sub-domain root folder, so accessing them on the web for a quick commit review is really easy (although the GitWeb default styling could be improved).
  3. This script is based on code from Casper Fabricious’ Keeping git repositories on Dreamhost using SSH.