<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35" -->

---
title: How Google Manages 2 Billion Lines of Code in a Single...
description: A walkthrough of a well-known paper/article on Google&#x27;s massive monorepo, which held roughly 2 billion lines of code and 84TB of data with 2014-era figures of...
canonical: https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How Google Manages 2 Billion Lines of Code in a Single Repository | daily.dev
og:description: A walkthrough of a well-known paper/article on Google&#x27;s massive monorepo, which held roughly 2 billion lines of code and 84TB of data with 2014-era figures of...
og:url: https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35
og:image: https://api.daily.dev/og/posts/PIaWptW35.png
og:image:alt: How Google Manages 2 Billion Lines of Code in a Single Repository
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How Google Manages 2 Billion Lines of Code in a Single Repository

**[Asli Engineering by Arpit Bhayani](https://daily.dev/sources/asli-engineering)** · 13 min read · 26 upvotes · 2 comments

## Summary

A walkthrough of a well-known paper/article on Google's massive monorepo, which held roughly 2 billion lines of code and 84TB of data with 2014-era figures of 15 million lines changed weekly, 40,000 commits per workday, and 500,000 read queries per second. Covers Google's history moving from CVS to Perforce to a custom system, the use of Piper and the FUSE-based CitC (Clients in the Cloud) tooling for lazy-loaded workspaces, trunk-based development with a single mainline branch, OWNERS files for code review gating, how monorepos avoid diamond dependency conflicts, and the Rosie automated refactoring tool. The presenter, a former Google engineer, argues monorepos suit agentic SDLC workflows but require heavy tooling investment and cultural buy-in around backward compatibility, concluding that Git-based multi-repo setups remain the right choice for most companies.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=l6oPw2prTXE>

## Questions this post answers

### What tool does Google use to let engineers work with its massive monorepo without cloning it locally?

Google uses a system called CitC (Clients in the Cloud), which pairs a cloud storage backend with a Linux FUSE-based virtual filesystem. It lazily loads only the files and directory metadata being accessed, and keeps local copies only of files that have been changed, referencing everything else from the remote source tree via copy-on-write semantics.

_Engineers researching large-scale repository tooling can find deeper architecture breakdowns like this through daily.dev._

### How does Google avoid diamond dependency conflicts across its codebase?

Google avoids diamond dependency conflicts because every team's code depends directly on the mainline branch rather than pinned versions, so there is never a case where two libraries require different versions of a shared dependency. Teams are responsible for maintaining backward compatibility, and if they cannot, downstream consumers must update their code when rolling out changes.

_daily.dev surfaces practical accounts like this for developers weighing monorepo tradeoffs against dependency management._

### How many lines of code and commits does Google's monorepo handle per day?

As of 2014 figures, Google's monorepo held roughly 2 billion lines of code across about 84 terabytes, with engineers modifying 15 million lines across 250,000 files weekly, around 40,000 commits per workday, and roughly 500,000 read queries per second against the repository.

_Developers benchmarking their own repo scale against Google's numbers can track similar deep dives on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@agustinbarrientos** · 0 upvotes

> Smaller teams should borrow Rosie's refactor playbook without copying Google's giant monorepo

## Similar posts on daily.dev

- [Why Google stores billions of lines of code in a single repository \(2016\)](https://daily.dev/posts/why-google-stores-billions-of-lines-of-code-in-a-single-repository-2016--gwsc2jk70) · Lobsters · 2 upvotes · 0 comments
- [Behind the Scenes: Block 450 JVM Repositories Into Monorepo to Reduce Dependency Drift](https://daily.dev/posts/behind-the-scenes-block-450-jvm-repositories-into-monorepo-to-reduce-dependency-drift-ek4wxtdxf) · InfoQ · 0 upvotes · 0 comments
- [Small Repo, High Quality](https://daily.dev/posts/small-repo-high-quality-lzy61mr2i) · Yegor's Blog · 99 upvotes · 11 comments
- [Why Monorepos are King in the Age of AI](https://daily.dev/posts/why-monorepos-are-king-in-the-age-of-ai-bjdsl4joh) · Nx · 0 upvotes · 0 comments
- [What 986 million code pushes say about the developer workflow in 2025](https://daily.dev/posts/what-986-million-code-pushes-say-about-the-developer-workflow-in-2025-4bpyjwlpr) · GitHub Blog · 4 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#google](https://daily.dev/tags/google), [#architecture](https://daily.dev/tags/architecture), [#version-control](https://daily.dev/tags/version-control)

[View this post on daily.dev](https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How Google Manages 2 Billion Lines of Code in a Single Repository","url":"https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35"},"datePublished":"2026-08-31T14:05:15.854Z","dateModified":"2026-09-13T18:46:03.885Z","description":"A walkthrough of a well-known paper/article on Google's massive monorepo, which held roughly 2 billion lines of code and 84TB of data with 2014-era figures of...","image":"https://i.ytimg.com/vi/l6oPw2prTXE/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/l6oPw2prTXE/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Asli Engineering by Arpit Bhayani","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Asli Engineering by Arpit Bhayani","logo":"https://media.daily.dev/image/upload/s--qezTGRtV--/f_auto,q_auto/v1780213733/logos/asli-engineering?_a=BAMAMiWQ0","url":"https://daily.dev/sources/asli-engineering"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":26},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"general-programming,google,architecture,version-control","timeRequired":"PT13M","video":{"@type":"VideoObject","name":"How Google Manages 2 Billion Lines of Code in a Single Repository","description":"A walkthrough of a well-known paper/article on Google's massive monorepo, which held roughly 2 billion lines of code and 84TB of data with 2014-era figures of...","thumbnailUrl":"https://i.ytimg.com/vi/l6oPw2prTXE/sddefault.jpg","uploadDate":"2026-08-31T14:05:15.854Z","duration":"PT13M","url":"https://api.daily.dev/r/PIaWptW35","embedUrl":"https://www.youtube.com/embed/l6oPw2prTXE"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Asli Engineering by Arpit Bhayani","item":"https://daily.dev/sources/asli-engineering"},{"@type":"ListItem","position":3,"name":"How Google Manages 2 Billion Lines of Code in a Single Repository"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35","comment":[{"@type":"Comment","text":"Smaller teams should borrow Rosie’s refactor playbook without copying Google’s giant monorepo","datePublished":"2026-09-10T21:48:05.424Z","url":"https://daily.dev/posts/PIaWptW35#c-GMfR5cC4e","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-google-manages-2-billion-lines-of-code-in-a-single-repository-piawptw35#faq","mainEntity":[{"@type":"Question","name":"What tool does Google use to let engineers work with its massive monorepo without cloning it locally?","acceptedAnswer":{"@type":"Answer","text":"Google uses a system called CitC (Clients in the Cloud), which pairs a cloud storage backend with a Linux FUSE-based virtual filesystem. It lazily loads only the files and directory metadata being accessed, and keeps local copies only of files that have been changed, referencing everything else from the remote source tree via copy-on-write semantics. Engineers researching large-scale repository tooling can find deeper architecture breakdowns like this through daily.dev."}},{"@type":"Question","name":"How does Google avoid diamond dependency conflicts across its codebase?","acceptedAnswer":{"@type":"Answer","text":"Google avoids diamond dependency conflicts because every team's code depends directly on the mainline branch rather than pinned versions, so there is never a case where two libraries require different versions of a shared dependency. Teams are responsible for maintaining backward compatibility, and if they cannot, downstream consumers must update their code when rolling out changes. daily.dev surfaces practical accounts like this for developers weighing monorepo tradeoffs against dependency management."}},{"@type":"Question","name":"How many lines of code and commits does Google's monorepo handle per day?","acceptedAnswer":{"@type":"Answer","text":"As of 2014 figures, Google's monorepo held roughly 2 billion lines of code across about 84 terabytes, with engineers modifying 15 million lines across 250,000 files weekly, around 40,000 commits per workday, and roughly 500,000 read queries per second against the repository. Developers benchmarking their own repo scale against Google's numbers can track similar deep dives on daily.dev."}}]}
```

