Great writeup! It's always fun to learn the details of the tools we use daily.
For others, I highly recommend Git from the Bottom Up[1]. It is a very well-written piece on internal data structures and does a great job of demystifying the opaque git commands that most beginners blindly follow. Best thing you'll learn in 20ish minutes.
Ooh, this looks fun! I didn’t know you could cat-file on a hash id, that’s actually quite cool.
Thanks - I think this is the article I was thinking of that really helped me to understand git when I first started using it back in the day. I tried to find it again and couldn't.
Oh, I hadn't ever seen that one. I "grokked" Git thanks to The Git Parable[0] several years ago.
[0]: https://tom.preston-werner.com/2009/05/19/the-git-parable