How does Git actually work?
summary
Shows exact on-disk actions: git init creates a .git with objects, refs, config and a HEAD symbolic ref; git add hashes file contents (SHA‑1), writes a compressed content‑addressed blob under objects/xx/, and records that blob in the index (the index = staging area/cache). git commit writes tree objects that reference blobs, creates a commit object with metadata and parent links, updates refs and reflogs. git reset has distinct modes (reset: soft/mixed/hard) that move HEAD, update the index, and/or overwrite the working tree; git gc prunes dangling objects.
AI-written summary · about
chapters (32)
- 0:00Introduction
- 1:10Git init
- 4:40Git description
- 6:05Head
- 9:35Add
- 11:10Show on
- 13:10Pig
- 15:25Compression
- 16:25Fck
- 17:55Garbage collects
- 20:10Pruning
- 21:20Backup advice
- 23:45The Index
- 27:40Git Status
- 28:35Update Index
- 31:35Why is Git called Git
- 33:20Will elute object still be in the database
- 34:20If you delete maincc can you retrieve it
- 35:55What is in the index
- 37:30Add and reset
- 38:55Index
- 39:25Index view
- 39:40Stage zero
- 40:40Git index
- 42:45Git add
- 43:45What happens when you commit
- 44:30Why does the index update
- 45:40Commit edit message
- 49:25Making a tree
- 52:05Why tree
- 53:40Tree objects
- 56:55Right tree








