Realizations That Helped Me Understand Git


This is unlikely to help you understand git, but I’ve been surprised before.

  • Git doesn’t have an inherent concept of diffs (though stuff may be stored internally that way for efficiency). Every commit can be thought of as a static snapshot of your project. Diffs are computed on the fly.
  • Git is a content addressable filesystem. Basically a hash table with signature {commit ID: Filesystem state at that ID}. All operations are computed from that basic data structure.
  • Commits know their parents but not their children.
  • Tags and HEAD are just pointers.
  • Being careful about what you commit in what order will save you a lot of pain and rebasing.
  • A lot of Git’s commands are named surprisingly well iff you know its data model.
    • Pickaxe is still a stupid name.
  • Being able to visualize a DAG changing and where you are on it is what made all the difference.
  • Git still isn’t easy to use. I can never put it in the back of my mind.

Related Posts

Random Thought: LC Theorem

I finally have an answer to "who's your favorite singer?"

My Top Tip for Helping People Get Started Programming

GPT-f

Random paper on angles

An Image is Worth 16x16 Words

Random stuff

Lossless Data Compression with Neural Networks by Fabrice Bellard

Downscaling Numerical Weather Models With GANs (My CI 2019 Paper)

Learning Differential Forms and Questions