Fragmented - Android Developer Podcast

197: .git internals with Gordon 🔧

May 4, 2020
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Plumbing Vs Porcelain Commands

  • Git exposes low-level "plumbing" commands for scripts and internals and high-level "porcelain" commands for day-to-day use.
  • Use plumbing like git-cat-file to inspect raw objects when you need internal visibility.
INSIGHT

Content-Addressable Object Store

  • Git stores content-addressable objects under .git/objects using compressed files named by SHA-1 hashes.
  • Use git-cat-file to reveal an object's type and contents because files are zlib-compressed with headers.
INSIGHT

Why Git Uses Content Hashes

  • Git is distributed, so identifiers are content hashes rather than centralized incremental numbers.
  • Everyone agrees on object SHAs, enabling offline work and later reconciliation with remotes.
Get the Snipd Podcast app to discover more snips from this episode
Get the app