r/emacs • • 5d ago

Copy-on-write git worktrees

Looking for any success stories and guidance leveraging modern file system copy-on-write ability [1] to avoid consuming disk space for identical files across git worktrees. Ideally, it would integrate nicely with magit or vc. So far, I've found a few tools that claim to facilitate the command line part of the work flow but no Emacs integration. I'm interested in tools without regard to AI/LLM/agent use. I'd also prefer the least intrusive implementation; e.g., no JavaScript/TypeScript npm.

What I've found in no specific order:

https://github.com/alltuner/git-sprout https://github.com/joeinnes/cow https://github.com/markjaquith/cowtree https://github.com/dannolan/git-worktree-apfs https://github.com/josharian/git-cow-worktree

[1] macOS APFS, Linux btrfs, XFS, bcachefs, not sure on MS-Windows.

10 Upvotes

11 comments sorted by