Clove: A Git worktree in ~1s on large repos, with dependencies handled clove.fas...

@best

Clove: A Git worktree in ~1s on large repos, with dependencies handled clove.fast · 11 points · 1 comments · HN thread

TL;DR Clove is a tool for creating git worktrees in about a second on large repositories, with the toolchain and dependencies already installed. It uses a continuously refreshed golden image of the base branch and copy-on-write clones of it, and adds commands for updating, pruning, checkpointing and tracking pull requests and agent sessions. Supported on macOS and Linux.

  • git worktree add creates a folder per branch but starts empty, so dependencies, dev shells and local files like .env must be set up again in each one.
  • Clove keeps a golden image, a worktree of the base branch with everything installed, refreshed in the background when the base moves; new clones are copy-on-write clones of it.
  • On macOS clones are APFS disk images copied with clonefile; on Linux they are btrfs snapshots taken in a few milliseconds.
  • Toolchains such as pnpm, npm, uv, Poetry, Go, Cargo, nix and mise are detected automatically; other setup steps go in a shared .clove.toml.
  • Commands cover rebasing clones with an agent resolving conflicts, pruning clones whose PRs merged (with a 7-day trash), checkpoints and rewinds, and listing PRs that need attention.
  • The author's benchmark on a monorepo with about 35k files and 4.5k npm packages reports creating a worktree in about a second versus over a minute previously.

Discussion The thread is very short, with a single top-level comment and no replies. The only commenter says they have used Clove recently and would recommend it, singling out its handling of node_modules across multiple worktrees and its TUI for cleaning up and tracking clones. The tone is positive and brief, and there is no critical discussion.

  • Recommends it after recent use, especially node_modules handling and TUI (a few): The one commenter reports having used Clove recently and finds it useful for managing node_modules across several worktrees. They also praise the TUI for cleaning up and tracking clones.

Links from the comments

#git #worktrees #developerTools #codingagents #monorepo #CLI