Git — GitLab
What is GitLab?
A complete DevOps platform delivered as a single application.
Create Project
- Click "New project"
- Choose project type
- Name your project
- Create project
Push to GitLab
git remote add origin https://gitlab.com/user/project.git
git push -u origin main
Clone from GitLab
git clone https://gitlab.com/user/project.git
GitLab Features
| Feature | Description |
|---|---|
| CI/CD | Built-in pipelines |
| Container Registry | Docker images |
| Package Registry | Package hosting |
| Wiki | Documentation |
| Snippets | Code snippets |
CI/CD Pipeline
# .gitlab-ci.yml
stages:
- test
- build
- deploy
test:
stage: test
script:
- npm test
build:
stage: build
script:
- npm run build
deploy:
stage: deploy
script:
- ./deploy.sh
Merge Requests
Similar to pull requests in GitHub.
Mini Practice
- Create GitLab project
- Push code
- Set up CI/CD
- Create merge request
Up Next
Continue with Remote Workflow — remote collaboration.
Related Topics
Frequently Asked Questions about GitLab
What is GitLab in Git?
GitLab is a fundamental concept in Git. This lesson explains it step by step with clear examples, making it easy for beginners to understand.
How do I learn GitLab?
Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn GitLab.
Why is GitLab important in Git?
GitLab is essential for Git development. Understanding this concept will help you write better code and solve real-world problems more effectively.