Ted Nyman – High Performance Git

Pencil sketch of a sailboat moored near a dock with shoreline buildings in the distance.

Git looks like a version-control tool. It is also a content-addressed database, a filesystem cache, a graph walker, and a transfer protocol.

This book is about those layers and the performance costs of each one. It starts with objects, refs, the index, and history traversal, then moves outward into packfiles, maintenance, sparse working trees, partial clone, transport, repository scale, diagnosis, configuration, and recovery.

It is written for engineers who need Git to stay fast as repositories, histories, and teams get larger: build and CI engineers, monorepo owners, developer-experience teams, and the people who wind up debugging strange Git behavior when the easy explanations stop working.

Section 0 · Introduction

  1. Introduction

Section I · Foundations

Why Git gets slow, what Git stores, and how refs and the index steer through it.

  1. Why Git Performance Matters
  2. Git's Core Data Model
  3. Refs, HEAD, Reflogs, Index

Section II · History and Rewrite

How Git walks history and how rewrite commands reshape it without mutating commits.

  1. Revisions and History Traversal
  2. Merge, Rebase, Cherry-Pick, Rewrite

Section III · Storage and Local Scale

Object storage, index cost, maintenance, and the techniques that shrink local state.

  1. Loose Objects, Packfiles, Delta Compression
  2. The Index as a Performance Structure
  3. Commit-Graph, Bloom Filters, MIDX, Bitmaps
  4. Git GC and Maintenance
  5. Sparse-Checkout and Sparse-Index

Section IV · Large-Repo Operations, Transport, and Scale

Clone shape, transfer policy, parallel work with worktrees, repository size, and ref scale.

  1. Partial Clone and Promisor Remotes
  2. Scalar, Prefetch, Large Repositories
  3. Worktrees
  4. Clone, Fetch, Push, Protocol v2
  5. Bundles and Bundle URIs
  6. Reducing Repository Size
  7. Large Ref Sets: Files, Packed-Refs, Reftable, and git refs

Section V · Diagnosis and Recovery

How to instrument Git, find the slow layer, apply high-leverage settings, and recover when the repository is actually wrong.

  1. Instrumenting Git
  2. Finding and Fixing Slow Git
  3. Configuration Playbook
  4. Recovery and Repair

Back Matter

  • Epilogue: Git in the Agent Loop
  • Appendix: Compatibility Guidance
  • Appendix: Approaches to Virtualized Working Trees
  • Glossary of Git Terms