Join the 85,000 open source advocates who receive our giveaway alerts and article roundups.
Open source code hosting comparisons
A code hosting comparison for open source projects
Get the newsletter
If you're starting a new open source project, or open sourcing some existing code, you'll need a publicly accessible location for the version control system holding your code (if you're not planning on setting up a publicly accessible VCS, reconsider; no public source control is a red flag to potential contributors). You could set up your own repository hosting, but with so many companies and groups offering existing setups and services, why not use one of those and save yourself some time? Here's an overview of some of the more popular options.
The granddaddy of code hosting sites, SourceForge has been around since 1999. It offers support for every popular revision control system, from CVS on up to Git. Most modern code hosting services are tightly integrated experiences, presenting a single UI with source code browsing, issue tracking, wikis, etc. While SourceForge is moving in this direction, they still keep some of their old kitchen sink philosophy, allowing projects to run phpBB forums, Wordpress blogs, or anything else they might want.
While still young compared to SourceForge, GitHub has become the de facto host for open source projects, with over 4.2 million repositories at the time of writing. GitHub's strength is their tagline, 'Social Coding'. On GitHub, it's trivial to make a copy of another developer's project, make changes to that project, and then submit those changes using GitHub's pull request system.
Given the number of developers already on GitHub, and how easy it makes submitting contributions, if you're starting a new open source project and hoping for community contributions, use GitHub. Unless you don't like Git.
Google Code Project Hosting is one of the most minimal code hosting options available, which may be appealing to anyone who already has their own infrastructure setup. In addition to offering Subversion, Mercurial, or Git repository hosting, Google Code provides wikis and simple issue tracking. The interface design is sparse, and does not provide the social hooks seen throughout GitHub.
Gitorious is noteworthy for being one of the few open source code hosting repositories that's actually open source itself. You're free to download and run the software yourself, or take advantage of their public hosting. They offer Git hosting, wikis, and a merge request system for community contributions (though the interface seems clunkier than the high mark set by GitHub).
Just as Git was squaring off against Mercurial for distributed version control dominance, GitHub was facing Bitbucket. Bitbucket began as a Mercurial only hosting service, but a year after its acquisition by Atlassian, it began offering Git support as well.
Bitbucket is very similar to Github. It offers pull requests, a highly visible fork button on each repository, issues, and wikis. One thing Bitbucket does offer that Github does not is unlimited private repositories. If you want to store your family's secret chocolate chip cookie recipe, Bitbucket will let you do it for free (you'll only need to pay after sharing the recipe with five other family members).
There are many more sites that provide free hosting. I've focused on a few of my favorites (this comparison is also avaliable on Github). If you're looking for something special (perhaps GNU Arch support?), or if you're just curious to see all the options, Wikipedia has a great comparison table.