Git worktrees that share files through copy-on-write clones
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
git-cow, a Rust tool and library by Gabriel Koerich, creates git worktrees as copy-on-write clones of one extra checkout per repository, so ignored folders like target/ and node_modules take no new disk until changed. In the author's single runs on an Apple Silicon Mac, a Rust build fell from 45.6 s to 31.7 s and a Python uv sync from 37.5 s to 5.7 s. It needs APFS, btrfs or XFS with reflink, and otherwise falls back to plain git worktree add. Those figures are self-reported and cover two repositories.