Modeling Git Internals in Alloy, Part 1: Blobs and Trees
Git stores all the code and commits in your repo in a content-addressable store. That means that if you know the hash of something, you can retrieve it from the store. This allows Git to do cool things like syncing and deduplication, but it's also the source of some of the weirder parts of Git's behavior from a beginner's perspective. Once I learned about the internals, I found it a lot easier to reason about what it was doing. If you're learning about them for the first time now, I hope you have a similar experience!
Source: Modeling Git Internals in Alloy, Part 1: Blobs and Trees, an article by Brian Hicks.