DEV Community

Ezhil Abinaya K
Ezhil Abinaya K

Posted on

Git & GitLab Basics

Git
Git is a Distributed Version Control System (DVCS) used to track changes in source code during software development.

  • It tracks code history.
  • It allows rollback to previous versions.
  • It Supports collaboration.
  • It Works offline. GitLab GitLab is a web-based Git repository management tool. Features:
  • Remote repository hosting.
  • CI/CD pipelines.
  • Team collaboration.
  • Issue tracking. It is Used to store and manage Git projects remotely. Version Control System VCS is a system that records changes made to files over time. Types of VCS: Local VCS: It Stored in local system only. Example: manual backups. Centralized VCS (CVCS): It has one central server. All users connect to it. Distributed VCS (DVCS): Every user has full copy of repository. Example: Git. Branching Branching means creating a separate line of development.
  • Develop new features.
  • Fix bugs.
  • Avoid affecting main code. Types of Branches: 1.Main/Master Branch: Production-ready code. 2.Feature Branch:Used for new features. 3.Bugfix Branch: Used for fixing bugs. 4.Develop Branch:Integration branch for testing. Types of Interfaces
  • CLI (Command Line Interface):Uses terminal commands. 2.GUI (Graphical User Interface):Visual tools with buttons. Important Git Commands git status: Shows current state of working directory. git add:Moves files to staging area. git commit:Saves snapshot of changes with message. git push:Sends local commits to remote repository.
git status
git add filename
git commit -m "Initial commit"
git push origin main
Enter fullscreen mode Exit fullscreen mode

Top comments (0)