Master Git & GitLab
Learn version control from scratch. Interactive tutorials, hands-on exercises, and real-world GitLab workflows.
📦 Git Basics
git init
Initialize a new Git repository in your project folder.
Not Startedgit add
Stage changes for commit. Tell Git which files to track.
Not Startedgit commit
Save your staged changes with a descriptive message.
Not Startedgit push
Upload your commits to a remote repository.
Not Startedgit pull
Download and merge changes from a remote repository.
Not Startedgit branch
Create, list, or delete branches for parallel development.
Not Startedgit merge
Combine changes from different branches together.
Not Startedgit clone
Copy an existing repository to your local machine.
Not Started📚 Your First Git Project
Step 1: Configure Git
Before starting, set up your identity:
Step 2: Initialize a Repository
Create a new folder and turn it into a Git repo:
Step 3: Make Changes & Commit
Create a file, stage it, and commit:
💻 Interactive Terminal
Practice Git commands below. Try: init, status, add, commit, log, branch
🦊 GitLab Essentials
GitLab is a complete DevOps platform. Sign up for free →
🔀 Merge Requests
Propose changes and request code review before merging branches. Discuss, review, and approve code directly in GitLab.
Docs →🐛 Issues
Track bugs, features, and tasks. Connect issues to MRs for complete traceability from idea to deployment.
Docs →⚙️ CI/CD Pipelines
Automate testing and deployment on every commit. Build, test, and deploy with GitLab's built-in CI/CD.
Docs →📋 Boards
Kanban-style project management. Visualize work in progress with drag-and-drop columns.
Docs →🔒 Protected Branches
Prevent direct pushes to main. Require reviews, tests, and approvals before merging.
Docs →🐳 Container Registry
Store and manage Docker container images. Build and deploy containers alongside your code.
Docs →📦 Package Registry
Host Maven, npm, NuGet, Helm, and other packages. Private package management built-in.
Docs →🔍 Code Quality
Automatic code analysis with every pipeline. Track technical debt and code smells.
Docs →🛡️ Security
SAST, DAST, dependency scanning, and more. Find vulnerabilities before they're deployed.
Docs →📊 Value Streams
Track cycle time and lead time. Measure and improve your development velocity.
Docs →🏷️ Labels & Milestones
Organize issues and MRs with labels. Track progress with milestones and due dates.
Docs →📝 Wiki & Snippets
Document your project with built-in wiki. Share code snippets with your team.
Docs →🚀 Your First GitLab CI/CD Pipeline
Create .gitlab-ci.yml in your repository root. This file defines your automated build, test, and deployment pipeline.
Key CI/CD Concepts
- stages: Define the order of jobs (test → build → deploy)
- image: Docker image to use for the job
- script: Commands to execute
- artifacts: Files to pass between jobs
- only/except: Control when jobs run (branches, tags)
- environment: Define deployment environments
More CI/CD Examples
Check out these resources for more examples:
🔄 Common Git Workflows
Feature Branch Workflow
- Create a new branch:
git checkout -b feature/my-feature - Make changes and commit
- Push to GitLab:
git push -u origin feature/my-feature - Create a Merge Request in GitLab UI
- Request review from team members
- After approval, merge the MR