GitLab
- Pronunciation
- GIT-lab
In short
GitLab is a Git hosting platform combining code review, issue tracking, CI/CD pipelines and security scanning in one application, in the cloud or self-hosted.
What is GitLab?
GitLab was started in 2011 as an open-source project by Dmitriy Zaporozhets and Valery Sizov, and the company GitLab Inc. went public in 2021. Like GitHub, it hosts Git repositories and adds collaboration on top, but it puts more emphasis on covering the whole software lifecycle in one product, from planning to deployment and monitoring.
Code review happens in merge requests, GitLab's name for pull requests. Its built-in CI/CD is configured in a .gitlab-ci.yml file in the repository, with stages, jobs and runners that can be hosted by GitLab or installed on your own machines. Container and package registries, environments, deployment approvals and security scanners for dependencies, containers and code are part of the same platform.
A major reason organizations choose GitLab is self-hosting. Its core is open source, and companies with strict security or compliance requirements, such as banks and public agencies, can run GitLab on their own servers, entirely inside their networks, while others use the hosted gitlab.com service.
A common misconception is that GitLab and Git are the same, or that GitLab is just a copy of GitHub. Git is the version control tool; GitLab and GitHub are separate platforms built around it, with different strengths, and a repository can move between them or be mirrored to both.
Key takeaways
- GitLab hosts Git repositories with review, issues and CI/CD in one place.
- It started in 2011 and became a public company in 2021.
- Merge requests are its pull requests; pipelines live in .gitlab-ci.yml.
- It can be self-hosted, which suits strict security requirements.
- Git is the tool; GitLab and GitHub are platforms built on it.
Example
stages: [test, deploy]
test:
stage: test
image: node:22
script:
- npm ci
- npm test
deploy:
stage: deploy
script:
- ./deploy.sh production
environment: production
rules:
- if: $CI_COMMIT_BRANCH == "main" # deploy only from mainReaders ask
What is the difference between GitLab and GitHub?
Both host Git repositories with code review and CI/CD. GitHub has the largest open-source community and marketplace. GitLab bundles more of the DevOps lifecycle into one product and is widely self-hosted by organizations that keep code on their own servers.
What is a merge request?
GitLab's term for a pull request: a proposal to merge one branch into another, where the changes are reviewed, discussed and checked by pipelines before merging.
Is GitLab free?
GitLab has a free tier on gitlab.com and a free, open-source edition for self-hosting. Paid tiers add features for larger teams, such as advanced security scanning, compliance and planning tools.
See also
- GitVersion Control, p. 10Git is a free, open-source distributed version control system that tracks changes to files over time, so developers can collaborate and undo mistakes.
- GitHubVersion Control, p. 25GitHub is a platform for hosting Git repositories and working on code together, with pull requests, code review, issues and the largest open-source community.
- Pull RequestVersion Control, p. 32A pull request is a proposal to merge changes from one branch into another, giving teammates a place to review, discuss, and test the code before it is merged.
- CI/CDDevOps & Cloud, p. 9CI/CD is a set of automated practices that build, test, and release code changes frequently, so software can be delivered to users quickly and safely.
- Code ReviewVersion Control, p. 4A code review is the practice of having other developers check code changes before they are merged, to catch bugs, improve quality, and share knowledge.
- RepositoryVersion Control, p. 34A repository is the storage location for a project, holding all of its files plus the complete history of every change recorded by a version control system.
Spotted a mistake or something missing on this page?Suggest an edit