In February 2017, Microsoft announced something that read almost like a dare: it had moved the entire Windows source tree — roughly 3.5 million files, about 270 GB — onto Git. These are Microsoft’s own February 2017 announcement figures for a specific point in time, not a description of the repository’s current size; both the repo and the tooling around it have changed materially since. Plain Git could not check out, or even git status, a repository that size in any usable amount of time. The Windows Git monorepo forced Microsoft to invent a filesystem-virtualization layer, GVFS, just to make the migration survivable — and five years later forced the same team to delete most of it. That reversal, and why it happened, is the more interesting engineering story than the migration itself.

The Scale Problem: What Moving Windows to Git Actually Meant
Git’s object model — content-addressed blobs, trees, and commits, snapshotted rather than diffed — gives correctness and cheap branching for free. It says nothing about performance once a working tree crosses a few million files. Before GVFS, Microsoft’s own reported numbers for a plain Git checkout of the Windows source tree were checkout up to 3 hours, status roughly 10 minutes, and clone over 12 hours (Microsoft Azure DevOps Blog, “Announcing GVFS (Git Virtual File System),” Feb. 2017). Those numbers describe every operation Git performs by default: checkout materializes every tracked file on disk, status stat()s every one of them to detect changes, and clone transfers every object reachable from every ref. None of that is a bug in Git — it is exactly what “clone everything, check out everything” promises to do. It simply stops being a reasonable promise somewhere well short of 3.5 million files.
The team’s options were narrow. Splitting the repository was rejected — Windows’ build and dependency graph did not decompose cleanly along repo boundaries at the time, and a monorepo has real, well-documented advantages (atomic cross-cutting commits, one source of truth for tooling) that Microsoft wanted to keep. That left one option: make Git itself scale to the tree, without changing what a Windows engineer’s daily workflow looked like.
GVFS: Making Every File Look Present Without Being There
Microsoft’s answer was GVFS (Git Virtual File System): a filesystem driver that makes every file in the repository appear present in the working tree immediately after clone, while lazily hydrating each file’s actual content only the first time something genuinely reads it. A background process pre-populates directory listings so that git status and directory enumeration don’t have to touch — and therefore don’t have to hydrate — files nobody has opened. The clone itself becomes a metadata-only operation; the multi-hour wait for file content is deferred until an engineer’s build or editor actually asks for that content, spread out over the life of the workspace instead of paid up front (Microsoft Azure DevOps Blog, “Announcing GVFS,” Feb. 2017).

Mechanically, this is virtualization at the filesystem layer, not at the Git layer: Git itself keeps believing it is looking at a normal working tree. The trick lives underneath, in a kernel-level filesystem driver intercepting reads and lazily satisfying them from the object store. That placement is exactly what makes GVFS powerful and, as the next section covers, exactly what eventually made it a liability.
Microsoft’s reported post-GVFS numbers, from the same February 2017 announcement: checkout around 30 seconds, status around 4–5 seconds, clone down to “a few minutes.” Read those two sets of numbers side by side and the order-of-magnitude win is unambiguous — and, per this hub’s standing rule on vendor figures, both sets are Microsoft’s own point-in-time, self-reported measurements, not an independently audited benchmark.
| Operation | Plain Git, pre-GVFS | With GVFS | Source / date |
|---|---|---|---|
git clone | 12+ hours | A few minutes | Microsoft Azure DevOps Blog, Feb. 2017 |
git checkout | Up to 3 hours | ~30 seconds | Microsoft Azure DevOps Blog, Feb. 2017 |
git status | ~10 minutes | ~4–5 seconds | Microsoft Azure DevOps Blog, Feb. 2017 |
GVFS worked. It shipped, Windows engineers used it daily, and it is the direct ancestor of everything discussed below. It is worth stating that plainly before the next section, because the interesting part of this story is not “GVFS failed” — it’s that a genuinely successful piece of engineering became the thing its own authors chose to delete.

Why Microsoft Retired Its Own Successful Abstraction
GVFS’s filesystem-virtualization trick depends on an operating-system API that lets a driver intercept and lazily satisfy file reads before they reach the real filesystem — on Windows, this meant a kernel-level projected-filesystem mechanism. That dependency is precisely where the story turns. When Microsoft needed a macOS build of Office using the same repository strategy, Apple deprecated the kernel filesystem-virtualization APIs GVFS depended on, in the middle of the port (GitHub Engineering, “The Story of Scalar”). GVFS’s core mechanism simply had no equivalent to stand on outside Windows.
What saved the effort was something GVFS itself had nothing to do with: Office’s build system already enforced disciplined, per-team dependency boundaries — teams could not casually reach across module lines to read files that weren’t declared as their dependencies. That discipline meant a much cruder tool could substitute for GVFS’s lazy hydration: sparse-checkout, which simply never checks out files a team doesn’t declare it needs, instead of a filesystem driver that hydrates everything on demand. No virtualization required, because the codebase’s own structure already bounded what any given engineer’s working tree needed to contain.

That substitution is what became Scalar. It began as a thin wrapper around GVFS’s internals, then was rewritten so that the mount/virtualization process was deleted entirely, replaced by upstream Git primitives — commit-graph, partial clone, sparse-checkout, and scheduled background maintenance. The CLI itself was reimplemented in C, in under 3,000 lines, deleting more than 10 times that amount of the prior .NET and virtualization codebase (GitHub Engineering, “The Story of Scalar”). Scalar merged into core Git and has shipped as the scalar executable in every Git release since Git 2.38 (2022) — not a Microsoft-only fork, but a tool anyone running plain, upstream Git now has.
GVFS vs. Scalar, side by side
| GVFS (2017) | Scalar (merged into Git 2.38, 2022) | |
|---|---|---|
| Core mechanism | Kernel-level filesystem virtualization; lazily hydrates file content on first real read | No virtualization — combines sparse-checkout, partial clone, commit-graph, and background maintenance |
| OS dependency | Requires a kernel-level projected-filesystem API | None — ordinary Git primitives, portable |
| Implementation | .NET, plus a separate mount/virtualization process | Reimplemented in C, under 3,000 lines |
| Codebase footprint | The larger, prior .NET/virtualization implementation | Deletes >10x that line count versus GVFS’s internals |
| Distribution | Standalone tool, separate install, own release cadence | Merged into core Git; ships as the scalar executable |
| Cross-platform portability | Blocked when Apple deprecated the macOS kernel FS-virtualization APIs it needed | Unaffected — no kernel dependency to lose |
| Prerequisite for adoption | None beyond installing the driver | A codebase disciplined enough that sparse-checkout’s declared-dependency model is actually sufficient |
That last row is the one worth sitting with. Scalar is not simply “a better GVFS” — it’s a bet that most teams don’t actually need lazy hydration of every file, only of the files outside whatever a team has explicitly declared it touches. Office’s dependency hygiene made that bet pay off. A codebase with looser, more tangled cross-team file access would not get the same win from sparse-checkout alone.
The Primitives Scalar Leans On
Scalar’s C rewrite works because, by 2022, Git upstream had independently built most of what GVFS used to provide with a kernel driver. None of the following originated with the Windows effort specifically, but the Windows-scale forcing function is why several of them got hardened as fast as they did.
Partial clone (Git 2.19, 2018) defers downloading object content rather than deferring checkout. --filter=blob:none fetches every commit and tree eagerly but pulls blob content lazily, on first read, from a “promisor remote” — the object-download analogue of GVFS’s on-demand hydration, implemented as a Git wire-protocol feature instead of a filesystem trick. --filter=tree:0 additionally defers trees, but GitHub’s own guidance steers everyday interactive use away from it, since ordinary history operations like git log -- path then trigger chatty, expensive tree fetches (primary/spec, partial-clone.adoc; GitHub Engineering, “Get up to speed with partial clone and shallow clone”).
Sparse-checkout “cone mode” (Git 2.25, 2020) is the actual GVFS-hydration substitute described above, and it needed its own performance fix to be usable at monorepo scale: arbitrary gitignore-style pathspec matching is O(N patterns × M paths), because wildcards and negation interact in ways that require checking every pattern against every path. Cone mode restricts patterns to two shapes — a recursive directory and its immediate non-recursive parent listing — so inclusion resolves via a directory-prefix hashset instead, O(M + N×d) with d the tree depth. GitHub’s own worked example took pattern matching from 5 minutes down to under 1 second, narrowing a checkout from 1,590 files to as few as 37 depending on the team (GitHub Engineering, “Bring your monorepo down to size with sparse-checkout”).

The commit-graph file (Git 2.18, 2018) exists so that “get me this commit’s parents and tree” never has to zlib-inflate and text-parse a raw commit object. Each entry stores a generation number — a value guaranteed to exceed every parent’s — that turns “is A an ancestor of B?” from a full DAG walk into an early-exit scalar comparison: if generation(A) is less than generation(B), a walk from B searching for A can stop the moment it passes below A’s generation, because A cannot possibly be reachable past that point (primary/spec, commit-graph.adoc). A refinement — “generation number v2,” using corrected commit dates instead of pure topological level — tightens those bounds further; which exact Git release made it the default is not independently pinned here and should be checked against current release notes before it is asserted anywhere.
fsmonitor (built-in daemon shipped in Git 2.37, 2022) turns git status from O(worktree) into O(changed-files) by asking the filesystem what changed instead of stat()-ing every tracked path. Git had already integrated with the third-party Watchman via a hook interface, but Watchman’s inconsistent Windows binary distribution made a built-in, no-dependency daemon the more reliable path for exactly the platform GVFS originated on (GitHub Engineering, “Improve Git monorepo performance with a file system monitor”).
Scheduled background maintenance rounds out the stack — repacking, commit-graph updates, and prefetching run on a schedule instead of blocking the next interactive command, so the cost of “keep this repo’s acceleration structures current” is amortized rather than paid synchronously by whichever engineer happens to run the next fetch.
None of these five pieces is exotic anymore. They are ordinary, upstream git — install any current Git release and they are already there, whether or not you have a 270 GB repository.
Reachability Bitmaps and the Rest of the Read-Side Acceleration Stack
Partial clone and sparse-checkout cut what crosses the wire and what lands on disk. A separate, complementary problem is query speed once the objects already exist locally: answering “what does clone/fetch negotiation need to enumerate as reachable from these commits?” without walking the whole object graph every time.
Reachability bitmaps — one bit per object, in pack order, compressed with a run-length scheme and XOR-delta-encoded against neighboring commits’ bitmaps — were originated in JGit and ported to C Git, landing as pack.writeBitmaps in Git 2.0 (2014). GitHub’s own 2015 retrospective reports the resulting index costing roughly 5–10% of the pack’s size in exchange for collapsing a reachability query that had taken “several minutes of CPU time” down to under 3 milliseconds, and an aggregate >90% reduction in average CPU time spent on network operations fleet-wide after rollout (GitHub Engineering, “Counting Objects,” 2015).

The follow-on numbers, all vendor-reported and dated, keep compounding: walking every object in the Linux kernel repository dropped from over 33 seconds without a bitmap to 1.57 seconds with one — roughly 21×. On-disk pack reverse indexes (.rev files) cut CPU time for homebrew/homebrew-core fetches by roughly 80%, and fleet-wide daily peak CPU dropped about 35%. Bitmaps were extended to cover multiple packs simultaneously in Git 2.34 (2021), and pairing multi-pack bitmaps with geometric repacking cut average repack duration from about a minute to roughly 15 seconds — a 4× improvement — while saving an average of 5.67 CPU-days per hour, fleet-wide, against the prior single-giant-pack strategy (GitHub Engineering, “Scaling monorepo maintenance,” 2022). Bitmap generation itself kept improving on the write side too: Git 2.55 (2026) cut generation time on one large repository from roughly 612 seconds to 294 seconds by skipping redundant tree recursion (GitHub Engineering, “Highlights from Git 2.55,” 2026).
None of these structures replace one another — bitmaps, commit-graph, and the multi-pack-index are complementary and increasingly integrated (bitmaps now compute over the multi-pack-index’s pseudo-pack ordering rather than a single physical pack). The pattern underneath all of them is the same move repeated at different layers: precompute a cheap-to-check, monotonic invariant so a full traversal becomes an early-exit comparison — generation numbers for ancestry, bitmaps for reachability. It is the identical logic a B-tree’s ordering invariant or an LSM-tree’s Bloom filter applies; Git just needed it applied to a commit DAG.
Who Else Runs a Monorepo — and Whether It’s Actually on Git
The Windows migration is the best-documented Git-at-scale story, and it is tempting to generalize it into “everyone runs their monorepo on Git.” That generalization is false, and getting the vendors right matters more than the general “Git scales” narrative.
Google’s monorepo runs on Piper, backed by Colossus (Google’s internal distributed filesystem), with a Perforce-lineage design and CitC (Clients in the Cloud) providing virtual, copy-on-write client workspaces — not Git, by Google’s own engineers’ account (Potvin & Levenberg, “Why Google Stores Billions of Lines of Code in a Single Repository,” Communications of the ACM 59(7), 2016). Meta’s monorepo runs on Sapling, which began roughly a decade earlier as a Mercurial extension and grew into an independent codebase with its own storage format and wire protocol by the time of its 2022 open-sourcing — Mercurial-derived, not Git (Meta Engineering, “Sapling: Source control that’s user-friendly and scalable,” Nov. 2022).

Three organizations, three different monorepo storage strategies
| Organization | System | Built on Git? | Storage backend | Client model | Source, dated |
|---|---|---|---|---|---|
| Microsoft (Windows) | Git, with GVFS then Scalar | Yes | Standard Git object store — packfiles, commit-graph, multi-pack-index | scalar clone; sparse-checkout cone mode over a real working tree | Microsoft Azure DevOps Blog, Feb. 2017; GitHub Engineering, “The Story of Scalar” |
| Piper + CitC | No | Colossus (Google’s internal distributed filesystem); Perforce-lineage design | CitC — virtual, copy-on-write client workspaces, not a full local checkout | Potvin & Levenberg, CACM 59(7), 2016 | |
| Meta | Sapling | No — Mercurial-derived | Own storage format and wire protocol, evolved out of a Mercurial extension | Sapling CLI, its own client tooling | Meta Engineering, Nov. 2022 |
The shape of that table is the real lesson, not just the trivia in it: three organizations independently facing “one repository, millions of files, thousands of engineers” arrived at three structurally different answers, and only one of them chose to keep the answer inside Git’s own object model. Microsoft’s constraint was different from Google’s or Meta’s — Windows needed to stay a Git repository other tools and workflows already assumed, where Google and Meta were building bespoke systems with no equivalent legacy commitment. Both are legitimate engineering answers to the same scale problem; they are not the same answer, and treating “Git” as a synonym for “how big companies do monorepos” erases the more interesting fact that they mostly don’t.
The Transferable Lesson: When to Retire Your Own Virtualization Layer
Strip away the Git specifics and the GVFS-to-Scalar arc is a rare, well-documented case of an engineering org voluntarily retiring its own successful, expensive abstraction — and being honest that the trigger was a change in adjacent circumstances, not a sudden insight that the original design had been wrong.
GVFS worked. It also required owning a kernel-level filesystem-virtualization layer, which is inherently fragile in a specific, structural way: the deeper an interception layer sits in the operating system, the more of its future is controlled by a vendor who owes it nothing. Apple’s deprecation of the macOS APIs GVFS needed wasn’t a Microsoft mistake to fix — it was a dependency Microsoft never fully controlled, surfacing exactly when a new platform made that dependency load-bearing in a place it hadn’t been tested before. Sparse-checkout and partial clone delivered most of the same practical benefit without owning that dependency, but only because Office’s codebase already had clean enough module boundaries to make “check out only what you declared you need” a workable substitute for “hydrate anything, lazily, on demand.”
That generalizes past filesystems. Any interception or virtualization layer — a service mesh sidecar, a kernel module, a custom protocol shim sitting between your code and a platform you don’t own — carries a maintenance cost proportional to how deep it sits in someone else’s stack, and that cost compounds silently until the day the platform vendor changes something underneath it. The habit worth stealing from this story isn’t “avoid virtualization layers”; GVFS was the right call in 2017, given what upstream Git could do at the time. It’s periodically re-asking whether the platform you’re virtualizing around has since grown a native primitive good enough to retire the virtualization — the way sparse-checkout, partial clone, commit-graph, fsmonitor, and background maintenance collectively did for GVFS by 2022. A team that never revisits that question keeps paying for a workaround the ecosystem has already made obsolete.
The second, quieter lesson is about who benefits from that retirement. GVFS itself never shipped as a general-purpose Git feature — it was Microsoft’s own driver, solving Microsoft’s own problem. Scalar’s five upstream primitives did ship generally: partial clone, sparse-checkout cone mode, the commit-graph, fsmonitor, and background maintenance are all in stock Git today, available to any repository, whether or not it is anywhere close to 270 GB. The org that hit the scale wall first ended up doing the engineering that benefits everyone after it, which is a more common pattern in infrastructure work than it gets credit for: the team forced to solve the extreme case is frequently the one that hardens the primitive the rest of the ecosystem eventually just gets to use.
❓ Frequently Asked Questions
Was GVFS a failure? No. GVFS worked as designed and Windows engineers used it in production for years. It was retired not because it stopped functioning, but because a cross-platform port exposed how fragile a kernel-level virtualization dependency is, and because upstream Git had since grown primitives — sparse-checkout, partial clone, commit-graph — that could substitute for it without owning that dependency.
What replaced GVFS? Scalar, a thin wrapper around GVFS’s internals rewritten so the virtualization/mount process was deleted entirely in favor of upstream Git primitives. Scalar was reimplemented in C at under 3,000 lines and merged into core Git, shipping as the scalar executable starting in Git 2.38 (2022).
Are the “3.5 million files, 270 GB” figures the Windows repository’s current size? No. Those are Microsoft’s own February 2017 announcement figures, describing the repository at the time of the GVFS launch. Both the repository and the tooling around it have changed materially since; treat the number as a historical data point, not a live measurement.
Does Google run its monorepo on Git? No. Google’s monorepo runs on Piper, backed by its internal Colossus distributed filesystem with a Perforce-lineage design, and CitC for virtual client workspaces — described directly by Google’s own engineers in a 2016 CACM paper. It is not Git.
Does Meta run its monorepo on Git? No. Meta’s monorepo runs on Sapling, which began as a Mercurial extension roughly a decade before its 2022 open-sourcing and grew into an independent codebase with its own storage format and wire protocol. It is Mercurial-derived, not Git.
Do I need a Microsoft-scale repository to benefit from any of this? No. Partial clone, sparse-checkout cone mode, the commit-graph with generation numbers, the built-in fsmonitor daemon, and scheduled background maintenance are ordinary features of any current Git installation. The Windows-scale forcing function is why several of them got hardened quickly, but none of them require a 270 GB repository to be worth turning on.
📚 Further Reading
- Anti-Corruption Layers: Safely Integrating Untrusted Systems — the general pattern behind why an interception layer like GVFS is a maintenance liability in proportion to how deep it sits.
- What Is a Container? The Idea That Powers Modern Software (and AI) — another case study in an abstraction layer trading a real cost for a real convenience, worth comparing against GVFS’s trade-off.
- Postgres as a Vector Database: What Benchmarks Say — a parallel discipline in reading vendor-reported benchmark numbers as attributed and dated, not neutral.
- Measuring Network Performance — the sibling Measure-pillar piece on separating what’s structurally fixed from what’s actually fixable through engineering.
- The Best Books on Distributed Systems (Beginner to Expert) — further reading on the systems concepts (caching, lazy loading, distributed storage) this article’s engineering choices draw on.
- Primary sources: Announcing GVFS, The Story of Scalar, Bring your monorepo down to size with sparse-checkout, Get up to speed with partial clone and shallow clone, Improve Git monorepo performance with a file system monitor, Counting Objects, Scaling monorepo maintenance, commit-graph.adoc, partial-clone.adoc, Potvin & Levenberg, CACM 2016, Meta Engineering, Sapling, 2022.
📚 Recommended Resources
Disclosure: some links below are Amazon affiliate links. If you buy through them, I earn a small commission — at no extra cost to you — which helps keep this site running.
Software Engineering at Google
Titus Winters, Tom Manshreck & Hyrum Wright · Book · ~$45 on Amazon
The book that best matches this article’s real subject — not Git commands, but what changes about engineering practice at the scale where a team decides to build, and later retire, its own filesystem-virtualization layer. It’s also free to read in full as HTML at abseil.io/resources/swe-book under a CC BY-NC-ND license; the print edition is worth owning if you want it on a shelf.
Version Control with Git, 3rd Edition
Prem Kumar Ponuthorai & Jon Loeliger · Book · ~$50 on Amazon
Goes underneath the commands into the plumbing this article is actually about — packfiles, the commit-graph, sparse-checkout — for readers who want the command-level detail behind what Scalar automates.
Designing Data-Intensive Applications, 2nd Edition
Martin Kleppmann & Chris Riccomini · Book · ~$60 on Amazon
This article’s core move — precompute a monotonic invariant (a generation number, a reachability bitmap) so a full traversal becomes an early-exit comparison — is a special case of storage-engine and indexing ideas Kleppmann covers generally. The natural next read after the “acceleration stack” section.
Pro Git, 2nd Edition
Scott Chacon & Ben Straub · Book · ~$40 on Amazon
The standard reference on Git’s object model itself — content-addressed blobs, trees, and commits — which is the foundation everything in this article builds on top of. It’s also free in full at git-scm.com/book under CC BY-NC-SA; read it there first, and pick up the print copy if you want a physical reference.
Worth knowing about even without a link: James Coglan’s Building Git rebuilds Git’s internals from scratch, chapter by chapter, in the same “engineered artifact” spirit this article takes. It’s sold ebook-only (PDF/ePub/Kindle, direct from the author’s own store) with no Amazon listing, so there’s no affiliate link here — just a pointer for readers who want to build the thing rather than only read about it.