When comparing GitHub vs GitLab, the Slant community recommends GitLab for most people. In the question“What are the best hosted version control services?” GitLab is ranked 1st while GitHub is ranked 2nd. The most important reason people chose GitLab is:
GitLab is a free and open source project licensed under MIT. Source code for Enterprise Edition can be found [here](https://gitlab.com/gitlab-org/gitlab-ee) and Community Edition [here](https://gitlab.com/gitlab-org/gitlab-ce).
Ranked in these QuestionsQuestion Ranking
Pro Integrated issue tracking
GitHub has integrated issue tracking that makes hunting and solving bugs easy. Each project's issues page can be filtered by closed issues, assignees, labels and milestones. Issues are also sortable by age, number of comments and update time.
Pro Nice and usable UI
GitHub's UI is clean and intuitive. Each view is designed to not fill the screen with useless information.
For example, the repository view displays only the most crucial data about that repo - on the top it displays the number of commits, branches, releases and contributors. When clicked, each of them will take the user to a page that displays more detailed information.
Pro Provides free hosting for static websites
GitHub Pages is a feature that allows developers to create websites for their projects or anything they need a static website for, for free.
Pro Anyone can fork
Any user can fork a project and submit a pull request. If accepted by the owner, the fork will be merged with the master branch.
Pro Large community
GitHub is the largest code host on the planet with over 21.4 million hosted repositories and many users. It's unarguably the largest VCS used by developers worldwide and as such, it has a vibrant community that follows it resulting in many guides and tutorials for new users. Even experienced developers can always find an answer to any question they may have.
Pro GitHub makes it easy to find open source projects
GitHub is the largest host in the world for open source projects. Developers from all over the world fork and work on countless projects hosted on it.
GitHub's search box is a powerful tool that allows developers to find open source projects in areas they are interested in and where they can immediately start to contribute.
GitHub also has a page dedicated solely at exploring and finding open source projects, grouping them by each topic they cover. In the same view, GitHub displays trending repositories and sorting them by day, week or month.
Pro Gist (Snippets)
Gists is GitHub's way to easily share code, text snippets or any kind of information with the world. They are an easy way to share text and they work as Git repos, which means that they are forkable and versioned. They are also fully compatible with Git.
Pro Simplified team management tools
GitHub has easy and useful features to control teams, large and small alike. Team members can be given different powers on different projects, ranging from the ability to create them, to only being able to have read-only access.
Pro Convenient continuous integration with Travis CI
GitHub can be integrated with Travis CI for code testing and deployment, furthermore it is free of charge for free open-source projects.
Pro Code search functionality
GitHub supports searching code. Whether it's from a specific project or from the whole website. What's more, GitHub has excellent SEO and you can easily find any line of code hosted on public repos on GitHub even from Google.
Pro Easy integration with cloud hosting services
Many widely used cloud hosting services are easily integrated with GitHub. Any project hosted on GitHub can be set up on these services in seconds. Some companies that offer this feature are:
- Amazon Web Services
- Google Cloud
- Windows Azure
Pro Supports Two-Factor authentication
GitHub has added another layer of security to their user accounts. This layer comes in the form of Two-Factor authentication. After it's enabled, GitHub delivers an authentication code by SMS, or by a free application for smartphones. After two-factor authentication is enabled, the authentication code is sent to the account owner's phone any time someone attempts to sign into their GitHub account. This means that only someone who has both the password and authentication code can sign into the account.
Pro Support for mandatory code reviews
GitHub allows maintainers to make code reviews mandatory for any repository they choose.
Pro Student discounts
GitHub offers very good student discounts along with other things, such as AWS credits.
Pro Additional features for academics
For those with a valid .edu email or valid school ID there are additional benefits such as free private hosting. While it may take time for the account to be verified, it can easily be worth it.
Pro Project management tools available
GitHub has a tool called (quite intuitively) "Projects". It helps teams to organize and prioritize the work they are doing by creating roadmaps and release checklists.
Pro Good web UI
GitLab's UI is clean and intuitive. Each view is designed to not fill the screen with useless information.
It displays the activity in a feed-type way in the most prominent part of the view. On top of that, there's a toolbar with buttons which can filter this feed by pushes, merge events or comments.
On the left, there's a menu that displays all the links that take you to the different views. For example, a file directory which displays all the files in that repo, a commit view which displays all the commits in cronological order, a network and a graph view that display important information graphically etc...
All these details make GitLab's UI extremely intuitive and easy to use, no view is overflown with information and every view displays only the most useful and crucial information needed at that time.
Pro Regular updates
GitLab is being constantly worked on and has a new release every month on the 22nd. Updating is also very easy through a single apt-get command.
Pro Has wikis and pages
Wiki and pages support out of the box.
Pro Support for protected branches
A protected master branch means that no code can be merged to master without passing a code review by an authorised developer. With GitLab this comes out of the box.
Pro Easy to install with the packages
With the packages available here, GitLab can be installed in two minutes.
Pro Supports pull requests
Has pull request (AKA, merge request) support.
Pro Permissions and roles are supported
It has private/public repositories, roles for users (master, developer, reporter, guest). All of these can be set from the user interface. Same permissions set for the UI work for the SSH as well.
Pro Integrates fully with LDAP
The Lightweight Directory Access Protocol is an application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network.
GitLab EE adds additional functionality over CE such as support for multiple LDAP servers and group sync.
Pro Comes with integrated CI/CD solution
GitLab CI makes it easy to set up CI and deployment for projects in GitLab. It supports parallel testing, multiple platforms, Docker containers and streaming build logs.
Pro Issue tracking support
Has issue tracking out of the box. Creating tickets, commenting on issues, closing issues etc... It's all there out of the box.
Pro Supports Approvers/Reviewers of Pull/Merge requests
Since 7.12 you can define a minimum number of approvers for merge requests.
Pro "Snippets" support
Snippets are similar to (well-known) GitHub "gists". They are a way to share code or have conversations about anything without needing a full git repo. The implementation here reminds more of a sort of pastebin.
Pro Can provide a Docker registry
The default docker.io registry is the docker hub but you can also login to other docker registries. And GitLab provides one for all Repos that make use of this feature.
A single instance can handle up to 40,000 users (requires a server with 64 core CPU and 64 GB of RAM) and it can run on multiple application servers to grow beyond that.
Pro Integrates with other systems by webhooks
Integrates out of the box with services like Bugzilla, Pushbullet, Microsoft Team Notification and many more - one can also add own webhooks to integrate with own services.
Pro Most GitLab EE features become part of GitLab CE after time
EE is the commercial Enterprise Edition, CE is the free and OpenScource Community Edition. Features such as Cycle Analytics were first a part of the EE and are now also available in CE.
Pro Manages large files and binaries with integrated Git Annex
Git Annex enables Git to manage large files (esp binaries) without checking them into Git.
Pro Integration with third party applications
GitLab integrates with multiple third-party services to allow external issue trackers and external authentication.
GitLab can integrate with many third-party apps to allow external issue tracking and authentication. It can also be integrated with several services, such as:
- Pivotal Tracker
Pro Allows Timetracking with Cycle-Analytics
Very useful project management feature that allows you to know how long it takes to go from the idea to production.
Pro Very feature rich RESTful-API
GitLab exposes a REST API that allows automation possible, like PR bots.
Con Only public repositories are free
Unfortunately, GitHub offers closed repositories only for premium users, and the price is not cheap at all.
Con Rule of thumb: 1GB per repository, 100MB per file
For most repositories this is acceptable, but for already large repositories with a long history, this may be a limiting factor.
Con Using it encourages other tools to integrate only with GitHub, leading to a monopoly
Con Owned by Microsoft
Con No OAuth2 support
In order to sign in to GitHub, users have to sign up first with unique credentials for GitHub only, so no option to sign in with Google+ or Facebook.
Con Very inconvenient UI
Very hard to switch between projects.
Con Not all features are free
GitLab's Service Desk features and some more are only available in GitLab EE.
Con The upgrade process fails more often than not
Even for minor versions such as 9.2.0 to 9.3.0. Sometimes the upgrade failure is silent and only seen when logging in first time after update and an http 502 error is given.
Con Requires at least 1GB of RAM
The default installation is meant for already many users and recommends 2GB of RAM. 1GB is possible but results in some HTTP 500 errors. On a Raspberry Pi 2 it runs fine most of the time, though it eats 75% of the RAM.
Another option is to reduce
unicorn['worker_processes'] in gitlab.rb.
Con Not lightweight
GitLab is demanding, Gitea is a much more lightweight solution which uses less CPU and memory.
Con No Windows support
There is no support for Windows. The use of a virtual machine will be required.
Con Bad code review possibilities
No precommit reviews.