---
title: Keeping Git Fast at Scale
description: Keeping git fast at scale isn't about a bigger machine. Partial clone, sparse-checkout, fsmonitor and the commit-graph cut the work git does per command.
canonical: https://lukeocodes.dev/git-at-scale
type: article
locale: en_GB
published: 2026-08-18T00:00:00.000Z
modified: 2026-08-18T00:00:00.000Z
authors:
  - Luke Oliff
section: Git
tags:
  - Git
  - Engineering
  - monorepo
  - sparse-checkout
  - partial clone
  - commit-graph
  - fsmonitor
feed: https://lukeocodes.dev/rss.xml
search: https://lukeocodes.dev/search.json?q={query}
schema:
  - "@context": https://schema.org
    "@graph":
      - "@type": WebSite
        "@id": https://lukeocodes.dev/#website
        url: https://lukeocodes.dev
        name: Luke Oliff
        alternateName: lukeocodes
        inLanguage: en
        publisher:
          "@id": https://lukeocodes.dev/authors/luke#person
        description: Personal blog and writing by Luke Oliff — developer relations, voice AI, developer experience.
        potentialAction:
          - "@type": SearchAction
            target:
              "@type": EntryPoint
              urlTemplate: https://lukeocodes.dev/blog/search?q={search_term_string}
            query-input: required name=search_term_string
      - "@type": Person
        "@id": https://lukeocodes.dev/authors/luke#person
        name: Luke Oliff
        url: https://lukeocodes.dev/authors/luke
        description: Engineer and developer relations leader. Writing about developer relations, AI, and the voice industry, from the UK.
        mainEntityOfPage: https://lukeocodes.dev/authors/luke
        givenName: Luke
        familyName: Oliff
        image: https://lukeocodes.dev/authors/luke.jpg
        jobTitle: Engineer and developer relations leader
        sameAs:
          - https://www.linkedin.com/in/lukeocodes
          - https://github.com/lukeocodes
          - https://bsky.app/profile/lukeocodes.dev
          - https://x.com/lukeocodes
          - https://hashnode.com/@lukeocodes
          - https://dev.to/lukeocodes
        knowsAbout:
          - Developer Relations
          - Developer Experience
          - Voice AI
          - Text-to-Speech
          - Answer Engine Optimisation
          - Search Engine Optimisation
          - Open Source
          - Developer Tooling
          - API Design
          - Speech-to-Text
          - Voice Agents
          - Community Building
        knowsLanguage:
          - English
        nationality: British
        alumniOf:
          - "@type": Organization
            name: The Open University
  - "@context": https://schema.org
    "@graph":
      - "@type": Person
        "@id": https://lukeocodes.dev/authors/luke#person
        name: Luke Oliff
        url: https://lukeocodes.dev/authors/luke
        description: Engineer and developer relations leader. Writing about developer relations, AI, and the voice industry, from the UK.
        mainEntityOfPage: https://lukeocodes.dev/authors/luke
        givenName: Luke
        familyName: Oliff
        image: https://lukeocodes.dev/authors/luke.jpg
        jobTitle: Engineer and developer relations leader
        sameAs:
          - https://www.linkedin.com/in/lukeocodes
          - https://github.com/lukeocodes
          - https://bsky.app/profile/lukeocodes.dev
          - https://x.com/lukeocodes
          - https://hashnode.com/@lukeocodes
          - https://dev.to/lukeocodes
        knowsAbout:
          - Developer Relations
          - Developer Experience
          - Voice AI
          - Text-to-Speech
          - Answer Engine Optimisation
          - Search Engine Optimisation
          - Open Source
          - Developer Tooling
          - API Design
          - Speech-to-Text
          - Voice Agents
          - Community Building
        knowsLanguage:
          - English
        nationality: British
        alumniOf:
          - "@type": Organization
            name: The Open University
      - "@type": BlogPosting
        "@id": https://lukeocodes.dev/git-at-scale#article
        headline: Keeping Git Fast at Scale
        alternativeHeadline: Keeping Git Fast at Scale
        description: Keeping git fast at scale isn't about a bigger machine. Partial clone, sparse-checkout, fsmonitor and the commit-graph cut the work git does per command.
        datePublished: 2026-08-18T00:00:00.000Z
        dateModified: 2026-08-18T00:00:00.000Z
        url: https://lukeocodes.dev/git-at-scale
        mainEntityOfPage: https://lukeocodes.dev/git-at-scale
        inLanguage: en
        author:
          - "@id": https://lukeocodes.dev/authors/luke#person
        isPartOf:
          "@id": https://lukeocodes.dev/#website
        keywords: Git, Engineering, monorepo, sparse-checkout, partial clone, commit-graph, fsmonitor
        articleSection: Git
        about:
          - "@type": SoftwareApplication
            name: Git
          - "@type": Organization
            name: Cursor
        abstract: Big repos get slow because git walks more objects. A blobless partial clone (--filter=blob:none), cone-mode sparse-checkout, the commit-graph and fsmonitor cut the walking, so most commands stay fast as the repo grows.
        speakable:
          "@type": SpeakableSpecification
          cssSelector:
            - .post-tldr
            - h1
        image: https://lukeocodes.dev/og.png?h=Keeping+Git+Fast+at+Scale&d=Keeping+git+fast+at+scale+isn%27t+about+a+bigger+machine.+Partial+clone%2C+sparse-checkout%2C+fsmonitor+and+the+commit-graph+cut+the+work+git+does+per+command.&e=Writing
        wordCount: 621
        timeRequired: PT4M
        publisher:
          "@id": https://lukeocodes.dev/authors/luke#person
      - "@type": BreadcrumbList
        itemListElement:
          - "@type": ListItem
            position: 1
            name: Home
            item: https://lukeocodes.dev
          - "@type": ListItem
            position: 2
            name: Writing
            item: https://lukeocodes.dev/blog
          - "@type": ListItem
            position: 3
            name: Keeping Git Fast at Scale
            item: https://lukeocodes.dev/git-at-scale
      - "@type": FAQPage
        "@id": https://lukeocodes.dev/git-at-scale#faq
        mainEntity:
          - "@type": Question
            name: What is a blobless clone?
            acceptedAnswer:
              "@type": Answer
              text: A partial clone made with git clone --filter=blob:none. It downloads all commits and trees but skips file contents, fetching each blob on demand when you check it out or diff it. Clones finish far faster on a large repo.
          - "@type": Question
            name: Does sparse-checkout make the repo smaller?
            acceptedAnswer:
              "@type": Answer
              text: It shrinks your working tree, not the object store on its own. Cone-mode sparse-checkout only writes the directories you name to disk, so status and builds touch fewer files. Pair it with a partial clone to also cut what you download.
          - "@type": Question
            name: What does the commit-graph file speed up?
            acceptedAnswer:
              "@type": Answer
              text: Commit walks. Operations like git log --graph, git merge-base and ahead/behind counts traverse commit history, and the commit-graph stores that structure precomputed so git skips parsing raw commit objects. It's a cache, safe to regenerate.
          - "@type": Question
            name: Is fsmonitor safe to turn on?
            acceptedAnswer:
              "@type": Answer
              text: Yes. Git has a built-in fsmonitor since 2.37, enabled with core.fsmonitor=true. It runs a daemon that watches the filesystem so git status doesn't scan every file. On a huge working tree status drops from seconds to milliseconds.
---

[Luke Oliff.](/)

- [Blog](/blog)
- [CV](/cv)
- [Uses](/uses)
- [User manual](/user-manual)
- [Living with ADHD](/living-and-working-with-adhd)
- [RSS](/rss.xml)

[Luke Oliff · Writing](/blog)

# Keeping Git Fast at Scale

Aug 2026 · [Git](/blog/category/git) · 4 min read · [Luke Oliff](/authors/luke)

**TL;DR:** Big repos get slow because git walks more objects. A blobless partial clone (--filter=blob:none), cone-mode sparse-checkout, the commit-graph and fsmonitor cut the walking, so most commands stay fast as the repo grows.

Keeping git fast at scale is mostly about doing less work per command, not buying a faster disk. Four features carry the load: a partial clone that skips file contents, cone-mode sparse-checkout that keeps your working tree small, the commit-graph that caches history walks, and fsmonitor that stops `git status` scanning every file. None of them are new, and most people never turn them on.

The topic came up again after Cursor published [Git at any scale](https://cursor.com/blog/git-at-any-scale) in August 2026. Their post is about the hosting side, a write-ahead log in S3 behind their Origin service hitting 120 pushes a second on S3 Standard and scaling reads across a hundred replicas. Impressive, and not your problem. What follows is the client side, the part you can change today without rebuilding version control.

## Why git slows down as a repo grows

Git is fast on small things and gets slower as three numbers climb: the number of objects it has to walk, the size of the working tree it has to stat, and the amount of history it has to parse. A monorepo pushes all three. A `git status` on a working tree with 200,000 files spends its time asking the filesystem about files you never touch. A `git log` on a decade of history parses commit objects one at a time. That is the real shape of git at scale, and each fix below attacks one of those numbers.

## Clone less: partial clone

A full clone downloads every version of every file that ever existed. You need almost none of it. A blobless clone skips file contents and fetches them on demand:

```bash
git clone --filter=blob:none https://example.com/big/repo.git
```

You get the full commit and tree history, so `git log` and `git blame` work, but blobs arrive only when a checkout or diff actually needs them. On a repo with a heavy binary history this turns a coffee-break clone into something that finishes while you're reading the URL.

## Check out less: sparse-checkout

If you only work in a couple of directories, don't materialise the whole tree. Cone-mode sparse-checkout, stable since Git 2.25, writes only the paths you name:

```bash
git sparse-checkout init --cone
git sparse-checkout set services/api libs/shared
```

Now your working tree holds `services/api` and `libs/shared` and their parents, nothing else. Every command that stats files, `status`, `checkout`, `commit`, has less to look at. Combine it with `--filter=blob:none` and you download less and check out less at once.

## Walk less: the commit-graph

History operations traverse the commit DAG, and parsing raw commit objects to do it is slow once there are hundreds of thousands. The commit-graph precomputes that structure into one file:

```bash
git commit-graph write --reachable
```

`git log --graph`, `git merge-base`, and the ahead/behind counts your prompt shows all get faster because git reads the cache instead of the objects. It's just a cache, so it's safe to regenerate, and modern git writes it during `gc` and `fetch` when `fetch.writeCommitGraph` is on.

## Stat less: fsmonitor

The last one is the biggest single win on a large working tree. `git status` normally stats every tracked file to see what changed. fsmonitor, built into git since 2.37, runs a daemon that watches the filesystem and tells git which files moved, so status skips the full scan:

```bash
git config core.fsmonitor true
git config core.untrackedcache true
```

On a tree with a few hundred thousand files this drops `git status` from seconds to under a hundred milliseconds. The untracked-cache line saves the other half, caching the scan for untracked files too.

Turn on all four and the repo stops feeling like it's fighting you. The fix for git at scale was in the box the whole time.

[← Newer: The Attribution Paradox: Measure Before You Scale](/the-attribution-paradox)

[All posts](/blog) →

## Search this site

`GET https://lukeocodes.dev/search.json?q=<words>` returns matching posts as JSON, each with its page URL and its markdown URL. Add `&limit=<1-50>` for more than 10. How it works: [/blog/search](https://lukeocodes.dev/blog/search.md).

```sh
curl "https://lukeocodes.dev/search.json?q=developer+relations"
```

---

© 2026 Luke Oliff. Posts live at the root of this site.

- [GitHub](https://github.com/lukeocodes)
- [LinkedIn](https://www.linkedin.com/in/lukeocodes)
- [X](https://x.com/lukeocodes)
- [Bluesky](https://bsky.app/profile/lukeocodes.dev)
- [Email](mailto:luke@lukeoliff.com)
- [RSS](/rss.xml)

## Cookies

This site sets one analytics cookie, from Google Analytics, and only in a browser that accepts the cookie banner. A client that does not run scripts sets no cookies, so there is nothing to accept or decline here.

[Cookie policy](/cookies)
