6 places to host your git repository

GitHub's recent acquisition has caused some users to explore alternatives to the popular code repository. Here are some to consider.
403 readers like this.
Houses in a row

27707 via Pixabay, CC0. Modified by Jen Wike Huger.

Perhaps you're one of the few people who didn't notice, but a few months back, Microsoft bought GitHub. Nothing against either company. Microsoft has become a vocal supporter of open source in recent years, and GitHub has been the de facto code repository for a heaping large number of open source projects almost since its inception.

However, the recent(-ish) purchase may have gotten you a little itchy. After all, there's nothing quite like a corporate buy-out to make you realize you've had your open source code sitting on a commercial platform. Maybe you're not quite ready to jump ship just yet, but it would at least be helpful to know your options. Let's have a look around the web and see what's available.

Option 1: GitHub

Seriously, this is a valid option. GitHub doesn't have a history of acting in bad faith, and Microsoft certainly has been smiling on open source of late. There's nothing wrong with keeping your project on GitHub and taking a wait-and-see perspective. It's still the largest community website for software development, and it still has some of the best tools for issue tracking, code review, continuous integration, and general code management. And its underpinnings are still on Git, everyone's favorite open source distributed version control system. Your code is still your code. There's nothing wrong with leaving things where they are if nothing is broken.

Option 2: GitLab

GitLab is probably the leading contender when it comes to alternative code platforms. It's fully open source. You can host your code right on GitLab's site much like you would on GitHub, but you can also choose to self-host a GitLab instance of your own on your own server and have full control over who has access to everything there and how things are managed. GitLab pretty much has feature parity with GitHub, and some folks might even say its continuous integration and testing tools are superior. Although the community of developers on GitLab is certainly smaller than the one on GitHub, it's still nothing to sneeze at. And it's possible that you'll find more like-minded developers among the population there.

Option 3: Bitbucket

Bitbucket has been around for many years. In some ways, it could serve as a looking glass into the future of GitHub. Bitbucket was acquired by a larger corporation (Atlassian) eight years ago and has already been through some of that change-over process. It's still a commercial platform like GitHub, but it's far from being a startup, and it's on pretty stable footing, organizationally speaking. Bitbucket shares most of the features available on GitHub and GitLab, plus a few novel features of its own, like native support for Mercurial repositories.

Option 4: SourceForge

The granddaddy of open source code repository sites is SourceForge. It used to be that if you had an open source project, SourceForge was the place to host your code and share your releases. It took a little while to migrate to Git for version control, and it had its own rash of commercial acquiring and re-acquiring events, coupled with a few unfortunate bundling decisions for a few open source projects. That said, SourceForge seems to have recovered since then, and the site is still a place where quite a few open source projects live. A lot of folks still feel a bit burned, though, and some people aren't huge fans of its various attempts to monetize the platform, so be sure you go in with open eyes.

Option 5: Roll your own

If you want full control of your project's destiny (and no one to blame but yourself), then doing it all yourself may be the best option for you. It is a good alternative for both large and small projects. Git is open source, so it's easily self-hosted. If you want issue tracking and code review, you can run an instance of GitLab or Phabricator. For continuous integration, you can set up your own instance of the Jenkins automation server. Yes, you'll need to take responsibility for your own infrastructure overhead and the associated security requirements. However, it's not that hard to get yourself set up. And if you want a sure-fire way to avoid being beholden to the whims of anyone else's platform, this is the way to do it.

Option 6: All of the above

Here's the beauty of all of this: Despite the proprietary drapery strewn over some of these platforms, they're still built on top of solid open source technology. And not just open source, but explicitly designed to be distributed across multiple nodes on a large network (like the internet). You're not required to use just one. You can use a couple… or all of them. Roll your own setup as a guaranteed home base using GitLab and have clone repositories on GitHub and Bitbucket for issue tracking and continuous integration. Keep your main codebase on GitHub but have "backup" clones sitting on GitLab for your own piece of mind.

The key thing is you have options. And we have those options thanks to open source licensing on very useful and powerful projects. The future is bright.

Of course, I'm bound to have missed some of the open source options available out there. Feel free to pipe up with your favorites. Are you using multiple platforms? What's your setup? Let everyone know in the comments!

User profile image.
Jason van Gumster mostly makes stuff up. He writes, animates, and occasionally teaches, all using open source tools. He's run a small, independent animation studio, wrote Blender For Dummies and GIMP Bible, and continues to blurt out his experiences during a [sometimes] weekly podcast, the Open Source Creative Podcast. Adventures (and lies) at @monsterjavaguns.


I have been a happy user of gitlab for my own projects. It's great as it allows private repos to exist in its free accounts.

I have been using bitbucket as my company use it. It have very limiting free account features.

GitHub didn't invent git, it's a big hype in my opinion.

I plan to keep GitHub just because it's been so ingrained in our culture as developers, but I have been really happy with GitLab and have been putting my new projects on there for a few years now. If you're on the fence, I really recommend trying it, especially if you want private repos, since it's free on GitLab.

I can also recommend https://framagit.org/. A French association promoting free software and respecting privacy.

The way I look at it, it's best to use *open first* - so perhaps your own Gitlab instance (it's easy to run), or use Gitlab's service if you prefer (although I'd avoid the proprietary features), and then *git mirror* your code in Github if you want the benefit of their network effect. A couple organisations I'm involved in are currently moving in that direction. I've already done it with my personal FOSS projects.

I think VSTS is a great alternative. It's more complex and not very known, but also more powerful.

My company uses gitgud and I'm quite happy with it. Surprised the author neglected to mention it. Any reason? I would like to see it included.

I wasn't familiar with GitGud. Looks like a separate free host for GitLab instances. Thanks for sharing!

In reply to by Vincent, foss … (not verified)

Nice article Jason! Though I agree that github "doesn't have a history of acting in bad faith," I would not employ a "wait-and-see perspective." I was looking to spin up my own git server but found that someone had already done all the hard work. I have been using http://gitstorage.com/ comfortably for a while now; definitely a viable alternative.

Oooh. That's a handy looking little device. A tad expensive for my tastes, though. If I'm rolling my own, I'd personally lean towards using something I already have on hand.

In reply to by Steve

I understand. The value I get for the additional cost is that my code is secure - the server is in my own network + code is encrypted.

In reply to by Jason van Gumster

Has anybody used Pagure?

For my personal use, I set up Gitolite (http://gitolite.com/). I only need a light-weight solution to host various scripts and "dot" files. Gitolite is very simple and allows you to manage the repository configurations through git itself. :-)

I wish someone would elaborate on option 5. Especially for use with Microsoft Visual Studio. VS has interactive support of Git but it gives the impression we must use GitHub. Am I correct that it is possible to have a source code library locally using Git? That is not made clear, at least not for beginners.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.