Getting started with gitlab
Source: Dev.to
What is Git
Git is a distributed version control system used to track changes in source code during software development.
It allows multiple developers to work on the same project, maintains a complete history of changes, and helps manage different versions of code efficiently.
Version Control System
A Version Control System (VCS) is a tool that tracks and manages changes to files over time, allowing users to view history and revert to previous versions.
Types of Version Control System
1. Local version control system
- Stores versions on one computer.
2. Centralized version control system
- Stores all versions on a central server accessed by multiple users.
- Example: SVN
3. Distributed version control system
- Each developer has a complete copy of the repository, including full history, on their local machine.
- Example: Git
What is GitLab
GitLab is a web-based DevOps platform that uses Git for version control and provides tools to manage the entire software development lifecycle, including code hosting, collaboration, CI/CD, and project management.
How to Push a File to GitLab
# Step 1: navigate to the project directory
cd
# Step 2: initialize a repository
git init
# check status
git status
# Step 3: add files
git add
# or add all files
git add .
# Step 4: commit changes
git commit -m "message"
# Step 5: push to remote
git push
What is a Repository
A repository is a storage location for source code files and folders, supporting collaboration among developers and maintaining a history of changes.
Hosting
Hosting provides server space and resources to make a website or application available online. It can be accessed over the internet.
Local Hosting
Local hosting runs a website or application on a local computer instead of an internet server. It is used for development, testing, and learning purposes.
Hosting tools: XAMPP, WAMP, MAMP
Server
A server is a computer or system that provides resources, data, or services, handling client requests via a request‑response model.
Examples: web server, file server, database server, application server.