GitHub vs GitLab: Main Differences
Written by Steven Vaughan-Nichols, on ZDNet
It's not GitHub versus GitLab. Both are based on the distributed version control system Git, but they have very different development approaches.
Many people ask me: "Which distributed version control system should I use for my programming project, GitHub or GitLab?" It's not a simple question.
First, do you really need a distributed version control system (VCS)? The job of a VCS (also known as a Source Code Management (SCM) system) is to make it easier for multiple developers, designers, and team members to work together on the same project. It ensures that everyone has the same access to the latest code and that changes are tracked.
This is easier said than done.
That's why Linus Torvalds thinks of Git as his other great invention. Git is free, open source, and fast. It also works better than its predecessors, such as Apache Subversion, Concurrent Versions System (CVS), Perforce, and Rational ClearCase. There's a reason so many VCS services have "Git" in their names.
Git
Of course, you can use Git alone on your own server. If everything you're doing is building a program internally, a local instance of Git is all you need. You can also use Git as a centralized VCS on your own servers or cloud. There's no need to subscribe to a VCS service when you can create your own. With this model, you can easily run a project with your team and partners spread around the world.
However, if you need the notifications of a hosted Git service, it's time to look at GitHub and GitLab.
GitHub
GitHub is the older of the services. It was developed by Chris Wanstrath, P. J. Hyett, Tom Preston-Werner, and Scott Chacon using Ruby on Rails in February 2008. Because of its first-mover advantage, GitHub became the foundation of many open source code repositories.
GitLab
GitLab came later; Ukrainian developers Dmitriy Zaporozhets and Valery Sizov created GitLab in 2011. From the first day, GitLab was designed to be a suite of collaboration tools, as well as a code repository service.
Similarities Between GitHub and GitLab
They look very similar. Both run on Linux servers, come with issue trackers, and offer a wide variety of third-party integrations and import tools.
Both also have command-line interfaces (CLI) for advanced developers and also offer web-based interfaces for new programmers.
In the case of GitLab, the user interface uses GitLab's own Pijamas design system and is written in Vue.js.
GitHub's user interface, Desktop, is available as a Windows or macOS program and now also in Visual Studio.
Although both support open source, the repositories themselves use a mixed programming model. GitLab used an open core business approach. In this model, the GitLab Community Edition remains free and open source, while the GitLab Enterprise Edition has more features and comes with support. As for GitHub, although its code contains some open source code, it's not an open source project.
Still, fundamentally, both offer web-based repositories with open source, Git-based code management, and local file changes with a remote repository. If all you want is basic Git functionality, but with someone else to worry about keeping Git running, either service will work well for you.
Of course, some people still don't like GitHub because Microsoft acquired it in 2018. For some, Microsoft will always be the "Evil Empire", no matter how much Microsoft shows that it now supports open source methods and software - or how often Microsoft's CEO, Satya Nadella says he loves Linux. That said, this was never as big a factor as some thought. Although some users fled from GitHub to GitLab and Atlassian BitBucket at the time, it was never the mass exodus some expected.
GitHub is clearly the 800-pound gorilla of the VCS world. According to programming tools company JetBrains, 77% of developers regularly use GitHub, compared to 40% for GitLab and 25% for BitBucket.
Differences
The main difference is that GitLab has integrated continuous integration/continuous delivery (CI/CD) and DevOps workflows. GitHub allows you to work with the CI/CD tools of your choice, but you'll need to integrate them yourself. Typically, GitHub users work with a third-party CI program, such as Jenkins, CircleCI, or TravisCI.
Another important difference is that GitHub puts speed first, while GitLab focuses on reliability.
Specifically, GitHub advocates merging new branches with the master branch. This way, you're ready to deploy quickly, while also quickly restoring your old version if something goes wrong.
In the GitLab workflow, you create multiple stable branches in addition to master. At minimum, you'll have stable production and pre-production branches. This means you'll need to go through a multi-stage testing process. A single code review in the merge request is not enough.
Of course, you can make either work the way you want, but there's a clear difference in the preferred approach.
Another fundamental difference is that GitLab offers a complete software development solution. They advertise themselves as a complete DevOps platform for a reason. That said, GitLab offers integrations with some third-party programs and platforms, such as Jira, Microsoft Teams, Slack, Gmail, and various other apps and platforms.
GitHub, on the other hand, offers fewer services within its own program, but offers ways to integrate with many external programs and services. This includes software that GitHub has worked to integrate into the service and hundreds of other programs via GitHub Marketplace.
Pricing
Both services offer free plans. These come with unlimited public and private repositories. This may be enough for you if you're a solo programmer or have a small team. But, if programming is your company's lifeblood, you'll need more.
It's hard to compare GitHub and GitLab pricing. They're apples and oranges. I suggest starting with their free plans to get an idea of how your workflow works on each platform, and then look to subscribe to the one that works best for you.
Subscription costs should be the least of your concerns. I've used both, and for my small-scale programming purposes, they worked extremely well.
That said, GitLab's Premium plan costs $19 per user per month, while the full Ultimate plan costs $99 per month.
As for GitHub, the Team plan costs $40 per user per year and the Enterprise plan costs $200 per user per year. But, the devil is in the details, you may find you need to pay for extras no matter which service you finally subscribe to.
Don't let price be your guide. What really matters is which one will give you the tools and services you need to develop your software in the best possible way.
- Translated by Prof. Uirá Ribeiro
That was just one piece. The course teaches the whole path — from your first command to exam day.