When I started learning version control, I thought Git and GitLab were the same thing. They’re related—but they have different roles.
Git = Version Control
Git is a tool that tracks changes in your code.
Use Git to:
Save project history
Create branches
Merge code
Collaborate with developers
Example:
git init
git add .
git commit -m "First commit"
GitLab = Code Hosting Platform
GitLab is a platform where you store Git repositories online. It also provides collaboration and CI/CD features.
Use GitLab to:
Push your code to the cloud
Collaborate with teams
Review merge requests
Automate testing and deployment
Example:
git remote add origin
git push -u origin main
Top comments (0)