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

Use of emphasis in speech

Generating a lot of language data with a theorem prover

"Litany Against Fear" in Present Tense

When it's time to party we will party hard

these are people who died

divine carrot

the frog

what it’s like to get nail phenolization

Why 0 to the power of 0 is 1

Lines and Points are Circles