About Alex Zhitnitsky

Alex is an engineer working with OverOps on a mission to help Java and Scala developers solve bugs in production and rid the world of buggy software. Passionate about all things tech, he is also the co-founder & lead of GDG Haifa, a local developer group. Alex holds a B.Sc from the Technion, Israel's Institute of Technology.

GitHub vs. Bitbucket: It’s More Than Just Features

Let’s go back to 2005 when Bitkeeper, host of the Linux kernel project back then, pulled the trigger and changed its core policies around pricing. The kernel’s license was an especially thorny issue after a free Bitkeeper clone was created by Andrew Tridgell – a key figure in the open-source community. Linus Torvalds didn’t like how the whole thing unfolded (to say the least), and began working on his own distributed version control system called Git (British slang for rotten person).

He’s famously quoted for it: “I’m an egotistical bastard, so I name all my projects after myself. First Linux, now Git”. Mercurial was another worthy alternative being developed for the Linux kernel by Matt Mackall with a similar purpose. Git eventually prevailed, and 3 years after that Bitbucket and GitHub were born. If one existed, I would pay honest money to watch a documentary about the full story.

But now that we’re done with this short piece of repo-history, let’s dig deeper at what each service offers us today, and also share some insights we gathered over time from our own experience with buckets and octocats.

Does my code have to be public?

Bitbucket and GitHub take different approaches to private and public repositories. This is at the heart of their pricing model, or even philosophy you might say. We’ll talk more about these differences below. Bitbucket offers unlimited free private repos while GitHub charges for them. Public repositories are unlimited and free in both services to an unlimited number of contributors.

Bottom line: No, you’ll get free private repositories on Bitbucket and pay for them on GitHub.

Where is it easier to work on open-source projects?

The difference in approach continues with the second aspect of pricing – the number of collaborators. Bitbucket’s main offering is a free account with up to 5 collaborators on private repositories, while GitHub’s focus is on its public repositories, so it has an edge there. Although they offer many similar features for code hosting, GitHub’s has been focused on open-source while Bitbucket seems to be more focused at enterprise developers, especially after its acquisition by Atlassian in 2010.

Bottom line: GitHub is the undisputed home for open-source.

Mirror mirror on the wall, who forks best of them all?

GitHub is definitely winning the popularity contest, having hit the 4M user mark. Bitbucket on the other hand is no underdog, offering a well rounded experience, as well as a part of Atlassian’s product suite. Both offer a slick front-end which includes issue tracking, wikis, easy to use REST APIs, and a rich GUI and command line tools for Windows, Mac, Linux and even mobile.

You could argue GitHub is ahead here, but it’s sometimes a matter of taste. One central feature available on GitHub but not on Bitbucket is Gists which let you apply version control to shareable code snippets or just plain text. There is a popular open issue on Bitbucket to implement this with Mercurial, but for now it doesn’t looks like it’s happening. Another highly ranked open issue on Bitbucket which is already available on GitHub is two-factor authentication. Almost forgot, you can’t spoon on GitHub!

Bottom line: It’s a matter of taste.

Pages – The 2048 Effect

A nice feature both services share is Pages – hosting simple HTML pages and opening up projects to users who may not necessarily be developers. You could say it’s a hellish feature for developers, having burnt some fine productive hours playing 2048 and its clones…

This feature is pretty much the same on both services. You can create a repo named either username.bitbucket.com or github.io and get your own nifty URL. github.io URLs are turning out to be a semi-obligatory feature for many open-source libraries and projects, paired with the complementary “Fork me on GitHub” banner. Watch out though, if you’re using a custom domain, it might cost you some precious loading time.

Bottom line: Awesome feature, available on both services.

To see and be seen

The difference between GitHub’s and Bitbucket’s approach is also evident in the Explore page. On Bitbucket this only shows up as a simple Search. GitHub on the other hand boasts trending repos and showcases popular topics, not to mention its use as a portfolio for developers and an open job board.

Bottom line: Unless someone is specifically looking for your project, it won’t be found on Bitbucket.

Where do they stand with community support?

A quick look at the newest questions on Stackoverflow will reveal that GitHub is asked about every couple of minutes, while Bitbucket questions take about an hour or two to resurface. You will find an answer to either question you might have though. Great resources and online communities are also available on the websites themselves, but GitHub is definitely miles ahead here. When we looked into the most popular libraries in Java, Ruby and JS, there was no doubt the place to look was GitHub. Again, its open-source nature has gained it a golden reputation.

Bottom line: GitHub, GitHub and GitHub.

Can I switch between the two?

Yes you can. Bitbucket makes it pretty straightforward to import your repositories from GitHub. I can’t say the same for the other way around, but it is possible of course, and a few walkthroughs are available out there. Some more work will be needed to transfer issues and wikis as well.

What is it about Git and Mercurial?

Although not the center of this post, you can’t talk about Bitbucket and GitHub without answering this question for yourself. Bitbucket was conceived as a tool for Mercurial and added Git support at 2011, while GitHub was all about Git from the beginning. There is no absolute right decision and they are actually very similar, check out this comparison right here. The main trade-off is a steep learning curve for Git in exchange for greater control than in Mercurial. If you’re migrating to a distributed version control system for the first time from systems like CVS or SVN, it is often considered easier with Mercurial.

What to expect with pricing?

Besides the enterprise options, Bitbucket puts a price tag of between $10-200 for 5-Unlimited collaborators. On GitHub, pricing is divided to personal and organizational accounts. The organizational accounts offer a team management layer and range between $25-200 per month for 10-125 private repositories. Personal accounts range between $7-50 per month for 5-50 private repositories. Academics enjoy free or discounted accounts on both.

Bottom line: Check out the attached comparison table and see for yourself.

What happened to on-premise?

Both services offer on-premise solutions and this is where Bitbucket hopes to outgun Github with a similar product by Atlassian called Stash. Unlike other account types, pricing here is a bigger pain point. Github asks for $5000 per 20 developers, and Bitbucket starts at only $10 for small teams up to 10 developers, and $1,800 for 11-25 developers.

When rising to hundreds of developers, Stash offers much lower prices for similar functionality as in GitHub. Some famous users of GitHub Enterprise are Blizzard, Rackspace and Etsy. Nasa, Netflix and Philips are with Stash.

Bottom line: GitHub Enterprise is way more expensive than Stash, offering similar functionality.

Newsletter

Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

Email address:

Recent Jobs

No job listings found.

Join Us

With 1,240,600 monthly unique visitors and over 500 authors we are placed among the top Java related sites around. Constantly being on the lookout for partners; we encourage you to join us. So If you have a blog with unique and interesting content then you should check out our JCG partners program. You can also be a guest writer for Java Code Geeks and hone your writing skills!

Disclaimer

All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners. Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. Examples Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.