In the last couple of years as both BitBucket and Github popularity increasedpeople are asking,which is better for your different projects? Which is cheaper? Which product has more useful features? And overall which product is recommended for each type of project? As we integrated and rolled out BitBucket support into Nudow Deployer, we wanted to take the time and compare the two services to identify which is better.
Comparing the two services only by cost is almost like comparing apples to oranges. Github charges you by the number of private repositories while the number of users that can collaborate on these repositories is unlimited. BitBucket charges by the number of users that are on your team or are collaborating on your projects, while the number of repositories is unlimited. For example, the Github “micro” plan allows you to create 5 private repositories and unlimited collaborators for $7/m while the smallest plan on BitBucket allows 10 users to unlimited private repositories for $10/m.
Github Price Chart
So which service should you use? I think the easy way to decide if only looking at price is if you have a team of developers such as a startup and you have many internal projects (your website, your application, your backend, your database, etc) then BitBucket might be a most cost effective option. On the contrary if you work with a lot of contractors that contribute to your projects on a regular basis, but you only have a few projects, then maybe Github is a better choice for you.
The tooling and process in both BitBucket and Github is almost identical. Both of them have simple issue tracking, Wiki’s, a full source code viewer with a history view and diffs, forking, pull requests, and following (watching someone). However there are a few key differences in how these features work that are worth mentioning.
First of all, BitBucket allows you to do code reviews on commits. In theory if you create each of your commits in a branch and do a pull request in Github, then you are able to replicatethe same review process. However with BitBucket, you can enforce code reviews, collaborate and annotate the code and finally “approve” the patch. The missing feature with this is that though there is an “approve” button, there is no “reject” or “revert” button. Because you cant block a commit from going in without a code review, adoption is very difficult as users simply forget to use it, think its not required for “small” or “emergency” bugs, or commit code not knowing that reviews even exist. With the additional of a “reject” button with automatic reverts, this could be a killer feature that sets it further apart from the competition.
Another interesting feature that Bitbucket supports is the ability to create a branch and do a pull request within the same repository very easily. This actually does also exist in Github, however this feature is almost hidden and you have to click around a lot before finding it. What this allows you to do is lets say you have a large application and you want to introduce the revolutionary new feature thats going to make you the next millions of dollars. You get a team of your best to slave away in a branch (so that master is still accessible for other feature and bug development) until this feature is polished and perfect. Finally when they are ready to reintegrate, your teamcan create a pull request to the master from the branch in the same project. To do this, they do not have to fork into another project, pay for additional project licenses, etc. In the pull request, you can see the full code merge, all of the commit discussions and approvals, and merge or decline this patch. So why do I mention this if its possible in both Github and BitBucket? Because in BitBucket, its very simple; you click on the branch and click “pull request”. In Github, you have to click on “pull requests”, click “new pull request”, select the two branches you want to compare (which is a little confusing on which is the “base” and which is the “compare” branch), finally if these branches are able to be pulled because the base is older than the branch, a box will show up asking you if you would like to create a pull request.
One highly used Github feature for which there is still no equivalentonBitBucket is Github pages.Github pages allows you to create a small website using static files and host it as a subdomain of Github.io. Many open source projects such aselastic search, twitter bootstrap, font awesome, and many more are using Github pages as the primary entry point to learn about the project. Additionally, many have moved from using blogging software to blogging using Github pages.Sincethe main similarity between open source projects, blogging sites, and every other use of Github pages is that they are all public, In the end it comes down to, if you want to create a publicly facing site using static files, then Github pages is a good approach. If you want to store private information about the project, you will either use Github or BitBucket Wiki or one of the industry leaders such as Atlassian’s Confluence. Even though there are plugins to integrate BitBucket with confluence, there is no great feature today which make BitBucket and Confluence a marriage made in heaven.
Github Pages Sample Page
On the topic of integration, both BitBucket and Github have a slew of integrations with different content management systems, continuous integration systems, and full build and deployment systems like Nudow Deployer. If looking at just the numbers, Github project settings have direct integration with 138 different services, while BitBucket only has 28. However if you are using any other Atlassian products (which you should), BitBucket’s integration with Jira, and Crucible is not comparable to Github’s. This integration allows you to see your commits from BitBucket inside of Jira to link to bugs and features from your commits and get all of the code review features inside of Crucible. Another thing to mention is that Atlassian’s Jira is one of the industry leaders in bug tracking. I have been using Jira for the last 6 years at many different companies and the features they provide, simplicity of the package, and configurations make this product one of the best in the industry.
Bitbucket integrtations with Jira, Bamboo, Crucible, and Jenkins.
Regardless of which product you use, both BitBucket and Github give you the ability to extend this integration by using service hooks and a full rest API giving applications access to your projects, keys, user information and anything else they need. Even though we know how many services integrate with Bitbucket and Github by looking at the services project settings, we don’t know how many services are like Nudow Deployer and are not listed on either site.
You maybe thinking, well who cares about all these features if I cant use them. My company isvery uptight with code security and we are only able to host git locally. Great news is that both BitBucket and Github come in downloadable form for enterprise customers. For the low price of $5000/y for a 20 user seat pack you can download and install Github which include featurescode reviews, LDAP integration, SSL, and open collaboration. For BitBucket, Atlassian created a separate product called “Stash”. It has the similar Atlassian cost structure of $10/m for 10 users and a steep incline in price from there. Stash, however, gives you much better integration with the rest of the Atlassian product line; better fine grain permissions with LDAP users, full Jira integration, etc.
Overall this comparison of the two products talks more about BitBucket features and seems to favor it, but in reality your selection between these two products can be based on only a few factors: what is the project and who are the people working on it. If you are working with a small, non-changing team on multiple projects or subprojects such as you would at a startup, then most likely BitBucket is for you. However if you are working on an open source project or you are working with many different developers at the same time, then the Github pricing model is probably better suited for you.
In fact 3.8 million users and 7.5 million repositories later, Github is still the leader for open source code storage, while BitBucket tries to catch up with its 1 million users. In terms of popular projects, BitBucket hosts code for Adium, Mailchimp, Opera, while Github hosts bootstrap, nodejs, jquery, rails, homebrew, and well the rest.
Really you cant go wrong, if you start with an open source project in Github, migrating your repository to BitBucket is as easy as setting a new remote origin and doing a push. This wont migrate your issues and wiki’s but to do that you may want to use a higher end, issue tracker and Wiki such as Jira and Confluence. But if you are going the route of starting with Atlassian products, then you might as well use Atlassian’s BitBucket or Atlassian Stash for better integrations between git and Jira.