← BackROYAL ANKIT AHIRAN
Skill 08 · Git

Version Control Concepts

Understanding how Git tracks snapshots of code locally through commits, isolated branches, and clean merges.

DEMO

What Was Built

A structured local workflow covering repository initialization, staging modified files, saving clear commit checkpoints, testing experiments on separate branches, and merging completed changes back cleanly.

How It Looked

A clean visual timeline showing blue main commits (`c1 → c2`), an amber parallel feature branch (`f1 → f2`), and a green merge node uniting verified updates safely.

What Was Learned

  • Commit: Recording an atomic snapshot of staged changes with a clear message so past working states stay recoverable.
  • Branch: Creating an isolated timeline (`git checkout -b`) to build or fix ideas without risking the working base.
  • Merge and Version Control: Rejoining tested branch history cleanly into `main` while resolving conflicts carefully.

Step-by-Step Concepts Flow

  1. Understand how version control tracks a snapshot when staged changes are saved with commit.
  2. Use a branch to isolate experiments safely from the main timeline.
  3. Use merge to combine verified branch updates cleanly back into main.
Sample Commands (for learning)
git add <file>
git commit -m "base snapshot"
git checkout -b feature
git checkout main && git merge feature

Proof

Sample Outputgit log --oneline
* 7b2a9d1 (HEAD -> main) Merge branch 'feature'
|\
| * 4e1f0c3 (feature) add validation helper
|/
* 1a9c4b2 base snapshot
Interface Capture Slot
● HEAD -> main
Commit graph visualization tracking base snapshots, branch work, and clean merges locally.
Local version-control branch and merge history frame.