GitIntroduction to Version Control

Introduction to Version Control

Version control refers to systems and processes that track changes to files, folders, and projects over time.


What Should Be Version Controlled?

Version control is useful for anything that:

  • Changes over time
  • Needs to be shared with others
  • Requires collaboration and traceability

What Can Version Control Do?

CapabilityDescription
Track filesMonitor files in different states
Combine versionsMerge content from different contributors
Identify versionsTag and refer to specific commits
RevertRestore older versions of files or directories

Why Is Version Control Important?

  • Ensures nothing is lost
  • Allows collaboration across teams
  • Provides accountability
  • Enables rollback in case of bugs or unwanted changes

Introducing Git

Git is a version control system widely used in software development and data projects.

  • Open source
  • Scalable and fast
  • Tracks every version
  • Supports collaboration through platforms like GitHub or GitLab

Benefits of Git

BenefitExplanation
🔁 RecoverableNothing is lost, every version is saved
👥 CollaborativeTrack who changed what and when
⏪ RevertibleUndo changes with a single command
🔍 ComparableView differences across versions

Using Git

Git works via the terminal (shell):

  • It’s a program for executing commands
  • Lets you inspect and navigate files

Useful Terminal Commands

pwd       # Print current directory
ls        # List contents of the folder
cd folder # Change directory

Check Git Version

git --version

Expected Output:

git version 2.46.0