GitLab vs GitHub - Detailed Comparison
- Nazar A.
- 19min read
For beginners, what is Git?
Linus Torvalds, the creator of the open source Linux operating system also created the concept of git which is a distributed version control system. Git enables programmers to keep track of changes to their code and to collaborate with teams or other individuals. Git is free and open source, and it requires repositories to store code and information about the development of that code.
Git tracks changes in code by creating a commit every time the source code is changed. This keeps a visual record of all that’s happened to the code during its development. A repository is required to store all these versions of code and their commits. Members of DevOps teams can then access the repositories.
Why do you need Git?
Well, if you found this post, you’ve probably already decided that you can’t move forward without implementing a git service in workflow. When you start programming you can just keep everything on your local machine and learn, but once you develop a project that you would like to share with the community then you have to become more efficient.
You will discover a big world called open source, where multinational companies or single enthusiasts create valuable projects and share code with other people. Moreover a lot of people who don’t even know each other, will work together collaboratively on those projects as joint contributors.
Publishing your code in open source creates a social effect. You will be a part of the larger tech community. You will be able to ask others for code review, show your projects at a job interview or if you are good enough and you have created a cool service, other people might ask to join your project and help you build it!
Also, when you get your first job, it is 99% likely that you will face git storage in your company. As a company grows, they hire more software engineers, and a lot of engineers will work on one project. They therefore have to keep their code base up to date., That’s when git as a technology solves a big problem in the tech world. Services like GitLab and GitHub provide some cool features that help even more, such as branching, merge requests, pull requests, CI and so on.
GitLab vs GitHub
What’s the difference between GitLab and GitHub? Each service has its own development story and its unique strengths. Teams have many factors to consider when choosing their service. We’ll run through some of the basic attributes of each and then compare them on some specific issues. We hope to help you make the best decision for your projects. Both services are compatible with DeployPlace, allowing you to deploy your code directly from any git hosting platform you choose.
What is GitHub?
The American company GitHub launched in 2008 as a development platform and hosting service for git repositories. It functions as a social network, with features that enable following, feeds, and wikis. GitHub was acquired in 2018 by Microsoft for an astonishing $7.5 billion and as of May 2019, it boasts 37 million users and more than 100 million repositories (including at least 28 million public repositories). It is familiar to most programmers as a trustworthy service.
GitHub is an open source standard. Companies create their repositories on GitHub and allow other people to create issues and contribute to them. Huge parts of frameworks, libraries, etc. are open source projects and are hosted in GitHub.
What is GitLab?
When GitHub was acquired by Microsoft, the tech community became nervous that their open source privileges would be compromised. GitLab, a Ukrainian company, was established in 2011 as an alternative to GitHub. They sought to distinguish themselves by providing services that cover the entire DevOps lifecycle. More than 100,000 organisations use GitLab as of 2019, including IBM, Sony, and NASA.
There are important features to consider when considering whether to choose GitLab or GitHub, so keep in mind that you’re choosing the best of two already good options. Both are seeking to outdo expectations and provide more features than just being a repository. Understanding the strengths of each can help you choose the best tools for your team.
GitHub vs GitLab: Features
We will cover here all the main features that both Git storages provide, including free and paid plans and with a small description of each feature.
- Free public repos - you can create an unlimited number of repos in GitHub for your projects, host any code, commits and keep everything up to date with GitHub. For long-time GitHub private repos were only in paid plans, but now GitHub also provides free private repos.
- Merge requests - GitHub provides a solution to create merge requests to your codebase. You can be sure that nothing will break your codebase, and you will be able to work with contributors in an easy way.
- Issue templates - When you build an open source project, it’s important to receive feedback from the community. GitHub has a solution called Issue templates. By creating Issue templates, contributors who submit Issues will be able to specify Issue type, such as Bug report or Feature request. It’s very useful as you will also be able to filter by issues and build priority.
- Project board - Another feature from GitHub is project boards. Project boards help you to create custom workflows and prioritise your work on issues or features, and to plan releases. You can create a project board for a group of projects or for the whole of your organisation.
- Self-hosted solution - If you are a big organisation, you may want to keep everything on your own servers instead of the cloud, and GitHub provides a Self-hosted solution. This provides you with more flexibility and security for your company.
GitHub pages - Its a great feature from GitHub, that allows you to create your pages just by creating a new repository with your static website according to documentation. It will be automatically deployed and hosted on
username.github.io.I personally like this feature, as you can host your resume or portfolio website in this way, it takes about 5 minutes to setup and is totally free.
- Third-party integrations - Both GitHub and GitLab have a lot of useful integrations. It’s unfair to single out just some of them, as there are hundreds of integrations, and probably you already use some of them.
- Free Private repos - GitLab provides free public repositories in the same way as GitHub, but also allows you to create free private repos! In case you are working on new technology, and you want to keep it private, GitLab private repos are waiting for you!
- CI Solution - Probably the most valuable feature of GitLab is that it provides its own CI solution out of the box. It’s a very simple, robust technology by GitLab. You can add .gitlabci.yml file to your project, set up it via documentation, and on every push, it will build your project and allow you to download artifacts.
- Integrated Time Tracking - Companies with software engineer teams often estimate and track the amount of time it takes to complete tasks. This process usually happens in an external tool, but with GitLab you can keep everything in one place with their internal Time Tracking feature.
- Integrated code review - One more awesome feature from GitLab is code review. You can review code from your engineers by comparing old and new versions side by side. You can write comments, highlight specific strings, and approve or decline changes.
- Burndown Charts - Visualisation in the world of data is a must. In the case of GitLab they provide a solution for visual representations of the progress of completing milestones. Milestones can be a list of features, a set of bugs that should be fixed, etc.
GitLab vs GitHub: Pricing
Let’s be real: often the driving factor in business decisions is the cost of service. The good news is that both GitLab and GitHub offer free versions of their products. They also have upgraded options for a monthly per-user fee.
Free usage includes:
- Unlimited public and private repositories
- 3 collaborators for private repositories
- Issues and bug tracking
- Project management
- Paid packages range from $7/user per month for more advanced tools to an Enterprise level, which requires you to talk with a salesperson to agree a fee.
Free usage includes:
- 2,000 CI pipeline minutes per group per month on shared runners
- Unlimited private and public projects and unlimited collaborators
- Paid packages range from $4/user per month for more approvers and faster customer service to $99/user per month for the full works, designed for large enterprises to enable them to keep up with high demands for development.
Let’s talk a bit about deploy from GitHub. At the moment GitHub doesn’t provide any solution out of the box to build your code or even deploy. They plan to release GitHub Actions, but currently you have to use external CI tools, such as CircleCI, Jenkins, etc. Once you have a CI tool setup, your code will be built on every commit you do, and you may have to think about whether to deploy it on servers or the cloud. With DeployPlace you can deploy from GitHub directly if you have something simple like a static website or client app. In case you have some complex application, you can deploy from CI by connecting it to DeployPlace.
Deploy from GitLab is much easier to use compared to GitHub. As GitLab has its own CI built-in to the platform, all you have to do is set up it. GitLab has great documentation and tons of examples of how to setup GitLab CI. Once you establish your GitLab CI, you can deploy it via DeployPlace. As well as with GitHub you can deploy static web pages or client apps directly from GitLab without CI. For complex applications, you can connect your GitLab CI and DeployPlace will take care of the rest.
GitHub vs GitLab: Usage
One of the important things when choosing what to use is understanding where and for what purposes you will use it. GitHub has been a well-known service for years, most programmers know how to use it properly, and probably every programmer knows basics like branching, merging, merge requests, etc. GitHub is also well known as an open source hub. If you plan to contribute in open source a lot, GitHub should definitely be your choice!
On the other hand, GitLab is a more closed platform, but it provides other values. For example, if you have a big company or team of software engineers, you may need to build your projects and deploy them somehow. GitLab provides awesome CI features out of the box.
You can build your project by setting up small
.gitlabci.yml file. After that on every commit, you will trigger runners that will build your project, and in case you have some errors, you will know about them.
GitHub vs GitLab: Familiarity
Another important aspect to consider when choosing your programming platform is that of familiarity. What do your people already know how to use? How intense would the learning curve be to establish a new platform?
Since GitHub was developed earlier, it’s the old standby of git repositories. Most programmers will be very familiar with its interface.
GitLab mimics many aspects of GitHub’s interface, with the hopes of diminishing the learning curve. That said, it’s more likely to take a little getting used to for the average team.
GitLab vs GitHub: Scope
GitHub focuses on maintaining repositories and its social networking features. It does easily integrate with other applications for continuous integration (CI), continuous delivery (CD), bug tracking, etc. One drawback to using multiple third-party applications though is having to keep them all updated to avoid compromising the fluidity of your system.
GitLab intends to be a “Complete DevOps” system for the entire programming lifecycle. It includes issue trackers, CI, and much more. It also provides better granularity for user permissions. For example, you can give access to some components like bug tracking individually. Or grant access to the issue tracker without giving access to your source code.
Consider your project requirements
For small teams working on open source projects or startup projects, GitHub is the most popular choice. Developers can connect to a big community and ask for help or feedback, track their issues and invite contributors who will help to grow the project faster. GitHub has a great track record, the service is comfortable for most developers, and they provide a fast interface.
GitLab tends to be more robust for larger teams and more expansive projects. They seek to integrate the many overlapping functions of DevOps into one application. They’ve proven their reliability and provide a compelling alternative for programmers. GitLab looks like a more Enterprise focused solution. It provides a lot of things out of box, and some of them are great everyday tools. For a lone-wolf developer they provide private repos and a large set of features.
Should companies choose GitLab or GitHub?
Most startups choose GitHub as they provide flexible rules for them. Another reason is that in your work process you will likely create some utility services for your platform. These could be useful for other people. As in GitHub you can create an organisation and share some repositories with the community and keep some of them private as core codebase.
A list of companies that use GitHub:
GitLab is also a very popular choice in big companies, because of its project management system, CI out of box, and other features mentioned before.
A list of companies that use GitLab:
Other comments to consider in the GitLab vs GitHub debate:
- Since GitLab offers unlimited free repositories, this may be your best bet if you want to keep your repositories private.
- GitHub’s global community can be a resource for developers.
- “One biiiig plus of GitLab is their transparency. If something goes wrong, they publish nearly every step of their recovery in a public place. For me this is much more trustworthy than all the cover up that some other companies do.”
- “Since GitHub is the “default” choice for a lot of people, it might offer more visibility to your projects.”
What we use at DeployPlace?
At DeployPlace we use self-hosted GitLab. We have chosen GitLab as most of us are familiar with it. We are happy with all the features GitLab provides, and I can’t imagine our life without integrated GitLab CI. Another important feature for us is its integrated code review tool. We use it every day, we use merge requests, code reviews, and branching. To be honest, most of us have GitHub accounts as well, we like to contribute in open source, and we want to be a part of the tech community. The lack of solutions from GitHub in the area of CI doesn’t allow us to chose it for our projects though.