hn.today

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

clove.fast13 points1 comments
Screenshot of Clove: A Git worktree in ~1s on large repos, with dependencies handled

Clove is a tool for creating separate Git worktrees for developers and coding agents without the usual setup delay. A normal worktree contains tracked files but not installed dependencies, development shells, or local configuration, so each workspace may require lengthy installs or improvised links to another checkout. Clove keeps a warmed “golden image” of the base branch with those ingredients, then makes copy-on-write clones that remain ordinary Git worktrees. It uses APFS disk-image cloning on macOS and btrfs snapshots on Linux, and refreshes the image after fetches or pulls, rerunning only setup steps whose inputs changed. In a cited monorepo with about 35,000 files, 4,500 npm packages, and a Nix shell, the comparison is 72 seconds and 3.1 GB per worktree versus roughly one second and 6 MB.

The tool detects common language runtimes, package managers, environment tools, and local files, while teams can define extra setup, warm-up, and teardown steps in a shared configuration. Its command-line interface, terminal UI, and desktop app also support rebasing worktrees with an agent to resolve conflicts, pruning merged pull requests with recovery from trash, and saving, restoring, or branching from checkpoints. Clove integrates with several coding agents, links their sessions to worktrees, and can derive recurring setup fixes from session histories. It also tracks processes and assigns clone-specific port offsets so services can be stopped cleanly when a worktree is removed.

Read on clove.fast1 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Laravel Go

Laravel Go

Laravel for Go is a full-stack web framework with routing, validation, database tools, background jobs, workflows, and real-time events. It also supports Inertia for frontend integration and is open source under the MIT license. (github.com)

Laravel Go

Laravel Go

Laravel Go is a batteries-included Go framework that combines routing, data access, authentication, queues, workflows, and other features in one package. It uses standard Go patterns and Inertia to serve React, Vue, or Svelte pages without separate API boilerplate. (laravel.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.