Skip to content
Tutorials Center
My learning

Topics

GitLab Tutorial

Learn GitLab step by step: 36 lessons in 9 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is GitLab? Learn what GitLab is, how it differs from plain Git, what GitLab.com, Self-Managed and Dedicated mean, and how an idea travels from issue to production.
  2. 2 Your Account and Finding Your Way Around Create a GitLab account, set up your profile, learn the page layout, project URL patterns, GitLab references, quick search and notification settings.
  3. 3 Groups, Projects and Namespaces Organize work in GitLab with groups, subgroups and projects: namespaces, visibility levels, member roles, inheritance, and how to create your first project.
  4. 4 SSH Keys and Access Tokens Connect Git to GitLab securely: generate SSH keys, add them to your profile, compare personal, project and deploy tokens, and choose the right scopes.

Projects and Merge Requests

  1. 5 Issues, Labels, Milestones and Boards Plan work in GitLab: write good issues, use labels and scoped labels, milestones, quick actions and issue boards, and link issues to code with closing keywords.
  2. 6 Merge Requests Basics Learn the GitLab merge request workflow: branch, push, open an MR, draft state, push options, closing keywords, tabs of the MR page and how merging works.
  3. 7 Code Review and Approvals Review code in GitLab merge requests: inline comments, threads, suggestions, reviewers, approval rules, code owners and the checks that gate a merge.
  4. 8 Merge Methods and Protected Branches Choose between merge commits, semi-linear history and fast-forward merges, use squash, and protect branches and tags so main stays safe.
  5. 9 Branching Strategies and GitLab Flow Compare trunk-based development, GitFlow and GitLab Flow, name branches and tags consistently, handle releases and hotfixes, and wire branches to environments.

GitLab CI/CD Pipelines

  1. 10 Pipelines and the .gitlab-ci.yml File Write your first GitLab CI/CD pipeline: the .gitlab-ci.yml file, jobs, scripts, images, how pipelines start, how to read results and how to lint your config.
  2. 11 Stages, Jobs and Job Ordering Control how GitLab CI jobs run: stages, .pre and .post, when, allow_failure, manual jobs, retry, timeout, parallel jobs, hidden jobs and extends.
  3. 12 Variables and Rules Use GitLab CI/CD variables (predefined, custom, masked, protected, file type) and the rules keyword with if, changes and exists to decide when jobs run.
  4. 13 Artifacts and Cache Understand the difference between GitLab CI artifacts and cache, pass build output between jobs, expire artifacts, key caches on lockfiles and test reports.
  5. 14 Needs, Includes and Reusable Pipelines Speed up and organize GitLab pipelines: DAG scheduling with needs, include for shared templates, parallel matrix jobs, child pipelines and multi-project triggers.

Runners and Jobs

  1. 15 Runners: Where Your Jobs Run Understand GitLab Runner: what it is, instance, group and project runners, hosted versus self-managed, tags, how a job finds a runner and common stuck-job fixes.
  2. 16 Installing and Registering a GitLab Runner Install GitLab Runner on Linux or in Docker, create a runner in the UI, register it with an authentication token, and understand every setting in config.toml.
  3. 17 Executors and Job Environments Compare GitLab Runner executors (shell, Docker, Kubernetes, autoscaling, SSH, custom), see how each isolates jobs, and pick the right one for your workload.
  4. 18 Docker Images and Services in Jobs Use image and services in GitLab CI to test against databases, set entrypoints, build container images with Docker-in-Docker or Kaniko, and push to the registry.

Environments and Deployments

  1. 19 Environments and Deployments Learn how the environment keyword turns a CI job into a tracked deployment, with URLs, manual gates, resource_group locking, stop actions and deployment history.
  2. 20 Review Apps and Dynamic Environments Create a live preview for every merge request with dynamic environment names, CI_COMMIT_REF_SLUG, stop jobs and auto_stop_in, and learn the cost and safety rules.
  3. 21 Deployment Strategies and Rollbacks Compare rolling, blue-green and canary releases, then use GitLab rollbacks, protected environments, deployment approvals and deploy freezes to ship safely.

Security and Compliance

  1. 22 Roles, Permissions and Protected Branches Understand GitLab roles from Guest to Owner, how permissions are inherited, and how protected branches, protected tags, push rules and CODEOWNERS guard your code.
  2. 23 CI Variables and Secrets Security Handle secrets safely in GitLab CI/CD: masked, protected and hidden variables, file variables, variable precedence, job tokens, OIDC ID tokens and external secret stores.
  3. 24 Security Scanning: SAST, Secrets and Dependencies Add SAST, secret detection, dependency, container and DAST scans to a GitLab pipeline with templates, read the reports, and set a severity gate for merge requests.
  4. 25 Compliance, Audit Events and Approvals Meet audit and governance needs in GitLab with merge request approval rules, compliance frameworks, pipeline execution policies, audit events and signed commits.

Packages and Registry

  1. 26 GitLab Container Registry Build and push Docker images to the GitLab Container Registry from CI, use predefined variables for login, tag images well, set cleanup policies and use the dependency proxy.
  2. 27 Package Registry Publish and install your own libraries with the GitLab Package Registry: npm, PyPI, Maven and generic packages, authentication with job tokens, versioning and access rules.
  3. 28 Releases and Semantic Versioning Publish GitLab releases from tag pipelines with the release keyword, attach asset links, follow semantic versioning, and generate a changelog from conventional commits.

Administration and Best Practices

  1. 29 Self-Managed GitLab: Installation, Backups, Upgrades Run your own GitLab: Linux package, Docker and Helm installs, key components, gitlab.rb and reconfigure, backups with gitlab-backup, secrets, restore tests and safe upgrades.
  2. 30 Groups, Subgroups and Governance Organize hundreds of projects with GitLab groups and subgroups: inheritance, group variables, shared CI templates, project templates, SSO, SCIM and naming conventions.
  3. 31 Pipeline Efficiency Best Practices Make GitLab pipelines faster and cheaper: needs and the DAG, rules:changes, caching, interruptible jobs, parallel tests, small images and shallow clones, with a critical-path model.
  4. 32 Branching and Workflow Best Practices Choose a branching workflow for GitLab: feature branches, trunk-based development and GitLab Flow, merge methods, squash, merge trains, small merge requests and review habits.

Projects and Practice

  1. 33 Project: A Complete Web App Pipeline Design a complete GitLab pipeline for a web app: lint, test, build an image, scan, review app, staging and manual production, then check the design with a validator you run.
  2. 34 Project: Release Automation Build an automated release flow in GitLab: conventional commits decide the version, a tag pipeline publishes packages and images, and a release page appears with notes and links.
  3. 35 Project: Reviewing a Deployment Design Practice reviewing a GitLab deployment design: promotion across environments, approvals, secrets, rollback and audit, using a scoring checklist and a promotion simulator you run.
  4. 36 Practice: GitLab CI/CD Questions and Fixes Test your GitLab knowledge with practice questions on rules, needs, variables, environments, registries and security, plus broken pipeline snippets to diagnose and repair.