<!-- 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

### How does Google's CitC (Clients in the Cloud) system let engineers work with an 84TB monorepo without cloning it locally?

CitC pairs a cloud storage backend with a Linux FUSE (file system in user space) mount that lazily loads files and directory metadata as engineers navigate the codebase. Only modified files are kept as local copies, using copy-on-write semantics, while every unchanged file is referenced directly from the remote source tree, avoiding the need to clone the entire repository.

_Engineers designing large-scale source control workflows can follow monorepo tooling deep dives like this on daily.dev._

### How does Google's monorepo avoid diamond dependency conflicts between library versions?

Because everything in Google's monorepo merges to a single mainline branch, teams cannot depend on different versions of the same library the way service A depending on library B and C, which in turn depend on conflicting versions of library D, would create elsewhere. Each team is responsible for maintaining backward compatibility, and downstream consumers must adapt if compatibility breaks, eliminating the version-mismatch scenario entirely.

_Developers weighing monorepo versus multi-repo dependency strategies can track these architecture tradeoffs on daily.dev._

### What scale of code changes did Google's engineering team handle in its monorepo as of 2014?

In 2014, Google engineers modified 15 million lines of code across 250,000 files weekly, within a monorepo holding roughly 2 billion lines of code and 84TB of data. The system processed about 40,000 commits per workday and handled 500,000 read queries per second.

_Teams sizing up infrastructure for massive codebases can follow scale benchmarks like this 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

---

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-08-31T14:10:54.408Z","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":"How does Google's CitC (Clients in the Cloud) system let engineers work with an 84TB monorepo without cloning it locally?","acceptedAnswer":{"@type":"Answer","text":"CitC pairs a cloud storage backend with a Linux FUSE (file system in user space) mount that lazily loads files and directory metadata as engineers navigate the codebase. Only modified files are kept as local copies, using copy-on-write semantics, while every unchanged file is referenced directly from the remote source tree, avoiding the need to clone the entire repository. Engineers designing large-scale source control workflows can follow monorepo tooling deep dives like this on daily.dev."}},{"@type":"Question","name":"How does Google's monorepo avoid diamond dependency conflicts between library versions?","acceptedAnswer":{"@type":"Answer","text":"Because everything in Google's monorepo merges to a single mainline branch, teams cannot depend on different versions of the same library the way service A depending on library B and C, which in turn depend on conflicting versions of library D, would create elsewhere. Each team is responsible for maintaining backward compatibility, and downstream consumers must adapt if compatibility breaks, eliminating the version-mismatch scenario entirely. Developers weighing monorepo versus multi-repo dependency strategies can track these architecture tradeoffs on daily.dev."}},{"@type":"Question","name":"What scale of code changes did Google's engineering team handle in its monorepo as of 2014?","acceptedAnswer":{"@type":"Answer","text":"In 2014, Google engineers modified 15 million lines of code across 250,000 files weekly, within a monorepo holding roughly 2 billion lines of code and 84TB of data. The system processed about 40,000 commits per workday and handled 500,000 read queries per second. Teams sizing up infrastructure for massive codebases can follow scale benchmarks like this on daily.dev."}}]}
```

