Curiosity is bliss    Archive    TIL    Tools    Search    RSS    About

Julien Couvreur's programming blog and more

A copy-on-write git worktree skill

 

Git worktrees share their .git objects but each gets a full copy of the working tree, which could be large (including build artifacts). On a copy-on-write filesystem you can reduce that cost too.

I built a git-cow-worktree agent skill including a file-based C# app for this.

CoW support is per-filesystem: Windows ReFS/Dev Drive (not NTFS), Linux Btrfs/XFS/ZFS (not ext4), macOS APFS.

The approach is adapted from this blog post. See also Microsoft’s Dev Drive and copy-on-write write-up.