---
title: "Improve Git monorepo performance with a file system monitor"
description: "Git 2.37.0 adds a builtin file system monitor daemon (`git fsmonitor--daemon`) for macOS and Windows, enabled by setting `core.fsmonitor` to true."
url: "https://swe.quest/articles/improve-git-monorepo-performance-with-a-file-system-monitor-1e7445f19bf20b0e"
canonical: "https://github.blog/engineering/infrastructure/improve-git-monorepo-performance-with-a-file-system-monitor/"
source: "GitHub Engineering"
published: "2022-06-29"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 22
tags: ["version-control","performance","developer-tools"]
---

# Improve Git monorepo performance with a file system monitor

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2022-06-29, 22 min read, Deep dive. Original: [https://github.blog/engineering/infrastructure/improve-git-monorepo-performance-with-a-file-system-monitor/](https://github.blog/engineering/infrastructure/improve-git-monorepo-performance-with-a-file-system-monitor/)

## Summary

Git 2.37.0 adds a builtin file system monitor daemon (\`git fsmonitor--daemon\`) for macOS and Windows, enabled by setting \`core.fsmonitor\` to true. The daemon registers for OS change notifications and keeps an in-memory, time-sorted queue of changed paths. Git commands query it over IPC using tokens that carry the daemon PID and a resync ID, so dropped events trigger a safe full rescan. Combined with \`core.untrackedcache\`, it cuts \`git status\` on Chromium and synthetic 1M/2M-file worktrees from 17–85 seconds to under one second by shrinking the refresh\_index and untracked-file phases, which also speeds up \`git diff\`, \`git add\` and \`git checkout\`.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Version control](https://swe.quest/tags/version-control.md) (Engineering practices)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)

## Prerequisites

- Git index and worktree
- file system change notifications ([easy posts on Communications](https://swe.quest/tags/communications.md?difficulty=easy))

## Keywords

Git, FSMonitor, git fsmonitor--daemon, untracked cache, Chromium, trace2

## Related posts

- [Measuring Git performance with OpenTelemetry](https://swe.quest/articles/measuring-git-performance-with-opentelemetry-5dc23c9e1ec580dd.md): GitHub Engineering · 2023-10-16 · Medium · 17 min read · Version control, Observability, Performance engineering, Developer tools
  trace2receiver is an open source OpenTelemetry collector component that converts Git's built-in Trace2 performance events into OpenTelemetry spans and metrics.
- [Optimizing Git’s Merge Machinery, #3](https://swe.quest/articles/optimizing-git-s-merge-machinery-3-2b68eed913acded5.md): Palantir · 2021-04-09 · Hard · 11 min read · Version control, Performance engineering, Algorithms, Open source
  Git's merge machinery can skip rename detection for source files whose renames cannot change the merge result: files unmodified on the unrenamed side of history, and files not needed for directory rename detection's majority rule.
- [Scaling merge-ort across GitHub](https://swe.quest/articles/scaling-merge-ort-across-github-6d05304b446e2f08.md): GitHub Engineering · 2023-07-27 · Medium · 5 min read · Version control, Performance engineering, Deployment
  GitHub replaced its libgit2-based server-side merge and rebase implementation with Git's merge-ort strategy, which needs no working directory and matches what the Git command line does.
- [Improving Git push times through faster server side hooks](https://swe.quest/articles/improving-git-push-times-through-faster-server-side-hooks-21ad6ccb34bf4962.md): GitHub Engineering · 2022-04-21 · Medium · 5 min read · Performance engineering, Version control, Go, Ruby, Refactoring & migrations
  GitHub cut pre-receive hook execution time on every Git push from about 880ms median to 10ms, dropping P99 by 95%, by rewriting the hooks from Ruby into its Go Git service.
- [Tame Dependabot: Group your updates, slow the cadence, keep security fast](https://swe.quest/articles/tame-dependabot-group-your-updates-slow-the-cadence-keep-security-fast-93c0e1277e884743.md): GitHub Engineering · 2026-07-29 · Medium · 8 min read · Supply chain security, Developer productivity, CI/CD
  Grouping Dependabot updates, moving the schedule from daily to monthly and covering every ecosystem actually used turns a steady stream of single-dependency pull requests into one batched PR per ecosystem per month.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
