This article will try to compare GitHub, GitLab and BitBucket Server (previously called Stash) installed on your own servers. Similar comparison of cloud offerings is outside the scope of this article. I won’t try to go feature by feature in some kind of a table so that you can count who has more features. I find that approach often misleading even though it’s very commonly used among companies (especially where there is a software architect around). Instead, I’ll give my opinionated view.
GitHub has a great, intuitive, informative and, to many, familiar UI. Its big advantage is that most of us already used GitHub.com (if not as a repository than at least to clone someone some code or to look at snippets). If installed on our own servers, most developers will feel at home. It features LDAP integration, integration with JIRA and many other features important to today’s companies. You’ll hardly be in need of something that GitHub doesn’t have. On top of “enterprise features”, it has Gists (a way to share code snippets), ability to edit files directly from the browser (comes in handy when taking notes during a meeting), works with almost any cloud provider, has powerful search, and so on. It comes with its own Wiki and issue tracking. In many cases it is enough for many needs. If it isn’t, it can easily be connected with Jenkins, JIRA, Confluence, BugZilla, Trello and many other products. It can be used as a full package or in conjunction with others. Simply put, GitHub is the gold standard for code repositories. Since everything is so peachy, we could just finish now so that you can go to their site and pay a huge amount of money for licences and install it. However, that’s where problems start accumulating, especially if you haven’t evaluated the alternatives.
First surprise comes when you discover that prices are nowhere to be found. You need to request a quote. In most cases, that’s a sign that prices are high (or at least higher than those of similar products). I won’t provide here the exact pricing since it depends on different variables but suffices to say that it costs more than other solutions. Is it worth it? Wait until we get to GitLab.
Another problem is installation. GitHub provides installation to various cloud providers or a VM that you can run on your own servers. I was truly surprised when I discovered this since it didn’t fit my guess of the reasons people have when considering GitHub Enterprise Edition. If I’d want it to run in one of the cloud providers, I’d simply purchase private accounts on GitHub.com. On the other hand, if I’d want to install it on my own servers, having a pre-made VM is not an option I’m comfortable with. Installation on my servers means that I (or someone from the organization) needs to be in control. Maybe I use VMWare or maybe I’d like to run it directly on the server. Maybe I’d like to know the installation steps. Maybe I would even want it to be deployed as a Docker container. No matter the choice, I need to be in control and having a pre-made VM image does not fit this need. That does not mean that the pre-made VM would not come in handy. In some cases it would and in some others it wouldn’t.
Finally, it’s not open source. I’m fully aware that most companies are never going to look at the code and even those who do will never contribute. However, this is similar to the problem I have with the installation. I like to know that I can be in control even if I will probably never have to modify anything. That would not be such a problem if closed-source provides things that open source doesn’t. However, that is not the case.
Let’s start with the simple statement. GitLab has (almost) everything that GitHub does. Features are more or less the same (with very few exceptions) and UI is as great as the one from GitHub. If you go to GitLab’s site you’ll have a hard time not thinking that you are in GitHub. One would need to look very hard to find something meaningful that GitHub has and GitLab doesn’t so let’s skip at what distinguishes GitLab from GitHub.
GitLab Community Edition is free and open sourced. That in itself gives it a huge boost when compared to GitHub Enterprise Edition (the only version that can be installed on premises). While there are some features available only in the enterprise edition, you might not need them and even if you do, it makes the decision easier knowing that you can start with the free version and upgrade to the paid one later on. That does not mean that GitHub doesn’t have a trial. It does. But, as trials go, it is for a limited period of time that might or might not be enough. With GitLab community edition you might be fine until the end of time or you might start with the enterprise edition right away. The good thing is that you have a choice that does not expire.
Pricing for the enterprise edition is reasonable (several times lower than with GitHub). Unlike GitHub, GitLab can be installed on virtually any hardware/OS/CM combination. Cloud providers, virtual machines, directly on the server, Linux, Windows, Puppet, Chef, and so on. I dare you to find a combination you’d like to use that is not supported by GitLab. They are even maintaining Docker images. More over, installation is dead simple. It shows the power of open source with infinite combinations community came up with and wrote about.
Let’s move on and take a look at the third contestant.
BitBucket Server (Formerly Stash)
Short story is that I do not recommend it. It has no advantage over the other two (except maybe integration with other Atlassian products), its UI is horrible (for the lack of better words) and it is a huge and slow application that will eat your resources in no time. However, it has a great marketing power through the rest of Atlassian products. JIRA, Confluence, Bamboo and other Atlassian offerings are very popular and present in many companies. That makes BitBucket Server a very tempting choice. However, not all products Atlassian makes are truly good with BitBucket Server and Bamboo being in the group of those that made my life harder than it should be. UI lacks information I expected to find (actually information is there but not where it should be) and is as un-intuitive as it can get. There is no option to commit code snippets (called Gists in GitHub) and no editing in-line. That leaves us with the integration with other products as the reason to purchase it. Right? Wrong! I haven’t seen anything in Stash (I’ll use the older and shorter name from now on) that was easier to set up than in GitHub or GitLab. Integration with Jira is easy in all of them (haven’t tried the integration with the rest of Atlassian products so that’s the part I might be wrong). Of course, if you are the company doing everything Atlassian, then Stash is no brainer. Where there’s room for JIRA, Confluence, Bamboo, HipChat and what not, there is room for Stash as well. But then again, the fact you’re reading this article probably means that you are not in that group.
Good thing about Stash is the pricing. It’s a one time fee that is not much higher than the yearly subscription to GitLab (we already established that GitHub is over the top). Moreover, if you’ll have only few users (up to ten) the price is so low that it’s practically free. Then again, you’re probably not thinking to set up your own repository for only a few people. However, the price is low only if you already have a Wiki and an issue tracking system. If you don’t that will cost you extra with Stash while the other two have it incorporated.
Besides the (questionable) price advantage and the desire to have everything Atlassian, there is no real reason to choose Stash.
If price is not an issue, you don’t mind closed-source, you’re OK with its installation options and you want to put your trust into the biggest and the greatest, choose GitHub Enterprise Edition.
If you must have everything Atlassian, choose BitBucket Server.
Everyone else should go with GitLab. It’s a great product, it’s open source with the enterprise offering, its pricing is reasonable and there’s nothing it lacks when compared to GitHub.
Finally, if you’d like to try it out and have Docker installed, just run the following command and you’ll see it in action in no time.