[ SRE_ARENA ]
VERSION CONTROL (GIT)

Git Doesn't Track Files. It Tracks Content.

System Architecture Visualization
DOWNLOADING CONCEPT: PHASE 1: THE THREE AREAS OF GIT...
  • ↳Git has three conceptual areas.
  • ↳Master this, and you eliminate 90% of confusion:
  • ↳1. Working Directory — The actual files on your disk.
  • ↳What you see in your editor right now.
  • ↳2. Staging Area (Index) — A 'holding zone'.
  • ↳When you run git add, you're moving changes INTO the staging area.
  • ↳3. Repository (.git/) — The permanent history.
  • ↳When you run git commit, everything in the staging area is permanently recorded as an immutable snapshot.
  • ↳Imagine packing a box to ship.
  • ↳Your messy desk is the Working Directory.
  • ↳The staging area is the box you're carefully placing specific items into.
  • ↳The commit is sealing, signing, and shipping the box.
▲ LIVE INCIDENTA developer says 'I committed secrets to the repo 3 commits ago'.
sre@arena:~/git
sre@arena:~$ git log --oneline -5