Back to browse
GitHub Repository

Lazily mount a git repo without cloning it. Works with ordinary git commands

1 starsRust

Git-lazy-mount mount a repo without cloning it. Works with ordinary Git

by mohsen1·Jun 26, 2026·7 points·3 comments

AI Analysis

●●●BangerBig BrainWizardry

FUSE-mounted git repos with sgrep integration avoid full clones for AI sessions.

Strengths
  • FUSE transparent filesystem means ordinary git commands work without modification.
  • Real benchmarks show 72MB→19MB for React, 652MB→27MB for TypeScript.
  • sgrep routes searches to Sourcegraph index instead of pulling entire repo.
Weaknesses
  • Linux-only due to FUSE dependency, no macOS or Windows support yet.
  • Regular grep still forces full fetch unless you use the sgrep workaround.
Target Audience

AI infra engineers, microVM operators, developers working with large repos

Similar To

git sparse-checkout · jgit · Sourcegraph

Post Description

Hello!

This is an attempt to make google3 style repo clones work with Git. In a HN thread a few days ago the idea sparked for me.

It can be super useful for very large repos that need to be cloned for AI coding sessions that might only need a subset of files to accomplish something.

Similar to google3, files appear to be there and can be read and edited but they are only fetched when they are needed.

It works with normal Git commands so there is no need for a new CLI.

On huge catch is, running grep will force fetch all files that grep glob matches. AI coding sessions run the Grep tool quite often. To mitigate this, git-lazy-mount comes with sgrep that offloads grepping to a remote code search engine like SourceGraph.

With this, microVMs that run AI sessions can stay lean and start up much faster.

I am guessing this is probably faster than baking in the git repo in the image but I have not measured performance of it yet. It is definitely useful if the microVM is spun up with unknown repositories (something like Claude on web).

Curious to hear your thoughts and criticism

Thanks!

Similar Projects

Security●●Solid

Tiny filesystem honeypot for macOS with zero dependencies in Go

Virtual filesystem honeypots without FUSE — WebDAV mode needs no root, NFS mode survives attacker scrutiny.

Big BrainNiche Gem
dweinstein
203mo ago