Git worktree alternative for macOS

A Git worktree alternative that duplicates the whole dev environment.

Git worktrees isolate tracked files. lpm Duplicate creates fast, standalone copies of the project you are actually working in — including its current state and local setup — then runs Claude Code, Codex, or any command in each copy.

Download for macOS
Developer ID signed · Notarized by AppleSafety, checksums & removal
Compare before downloading

Git primitive

Linked worktree

  • A linked checkout from a commit or branch
  • Shared Git objects, refs, and repository config
  • Minimal disk overhead

Best for lightweight branch checkouts

lpm primitive

Standalone Duplicate

  • A standalone folder with its own .git directory
  • Current local state and dependencies carried over
  • Agent task, services, and terminals managed together

Best for complete, parallel agent runs

The short answer

What is the best Git worktree alternative for AI coding agents?

Use lpm Duplicate when a second agent needs more than another branch checkout. It makes a standalone macOS project copy with its own Git repository, preserves the useful local state already on disk, inherits the project’s lpm services and actions, and can queue the agent task as part of the same flow.

Keep using Git worktree when you want a lightweight, linked checkout and are happy to prepare its dependencies, local files, services, and agent session separately. Worktrees are excellent at that job; lpm solves a larger one.

Git worktree vs lpm Duplicate

The isolation boundary is the real difference

A worktree isolates a checkout. lpm Duplicate isolates the project environment around that checkout, then connects it to the rest of the agent workflow.

Git relationship

Git worktree

A linked working tree that shares Git objects, refs, and repository config.

lpm Duplicate

A standalone project folder with an independent .git directory.

Starting point

Git worktree

Tracked files from a chosen commit or branch.

lpm Duplicate

The project’s current on-disk state, with an option to remove uncommitted changes.

Same branch in parallel

Git worktree

Git refuses a branch already checked out elsewhere by default.

lpm Duplicate

Each copy can stay on the same branch because its Git repository is independent.

Ignored and local files

Git worktree

Not included by a normal checkout; hooks or tool-specific include rules can copy selected files.

lpm Duplicate

Useful local files are copied by default while regenerable build caches are skipped.

Dependencies

Git worktree

Each new checkout normally needs its environment initialized.

lpm Duplicate

Existing dependencies stay available by default, or lpm can reinstall them.

Agent launch

Git worktree

Git creates the checkout; agent tools or your own scripts handle the session.

lpm Duplicate

The same flow can queue an lpm action, command, and prompt on every copy.

Dev stack

Git worktree

Git does not manage services, logs, ports, or terminals.

lpm Duplicate

Copies inherit the parent project’s lpm services, actions, profiles, and terminal setup.

Fan-out

Git worktree

Create and prepare each worktree directly or automate it with another tool.

lpm Duplicate

Create up to 50 labeled copies from one dialog or one lpm duplicate command.

Disk model

Git worktree

Very compact because repository data is shared.

lpm Duplicate

Fast APFS copy-on-write clone; storage grows as standalone copies diverge.

Platform

Git worktree

Built into Git and available across platforms.

lpm Duplicate

Built specifically for macOS and its APFS clone support.

How lpm Duplicate works

From active project to running agent in one flow

The unit of duplication is the project on your Mac, not only its tracked Git files.

01

Copy the project you have now

On APFS, lpm starts with a fast copy-on-write clone. Uncommitted work, useful ignored files, and installed dependencies come with it by default.

02

Choose how clean each copy should be

Keep the current state, strip uncommitted changes, pull the latest upstream commit, or reinstall dependencies. Stale build caches are left behind.

03

Run work immediately

Create one copy or fan out up to 50. Give every copy a label, group them, and queue the same or a different action, command, and prompt.

Parallel Claude Code and Codex

One command instead of a worktree setup script

The desktop flow is visual. The same Duplicate primitive is available to you and your coding agents through the lpm CLI.

Fan out one task
lpm duplicate myapp -n 3 --run claude \
--prompt "Find and fix the checkout race condition"

lpm wait --agent -p COPY_NAME
lpm remove COPY_NAME

Three independent repositories

Every agent can branch, commit, reset, or experiment without sharing Git administrative state with the others.

One prompt, parallel attempts

Queue the same task in every copy, compare the results, then keep the strongest implementation.

Agent-friendly lifecycle

Wait on completion, inspect changes, and remove disposable copies with explicit lpm commands.

Choose the right primitive

Worktree for a branch. Duplicate for an environment.

lpm does not make Git worktree obsolete. It gives you a larger isolation boundary when the task includes the local setup and running workflow around the code.

Choose Git worktree

Lightweight checkout isolation

  • You only need another tracked checkout or branch
  • Minimal disk use matters most
  • Sharing refs and Git objects is useful
  • Your setup is already automated for every new checkout

Choose lpm Duplicate

Complete project isolation

  • The current uncommitted state should be the starting point
  • Local config and installed dependencies should come along
  • Every agent needs its own standalone Git repository
  • You want to create, run, monitor, and remove copies in one workflow
FAQ

Git worktree and lpm Duplicate questions

  • Is lpm Duplicate based on Git worktree?

    No. A Git worktree is linked to a shared repository. lpm Duplicate makes a standalone copy of the project folder with its own .git directory, then removes any stale worktree registrations copied from the source.

  • Why use lpm Duplicate instead of Git worktree?

    Use lpm Duplicate when the agent needs the project as it exists locally, not only tracked files from a commit. It can preserve uncommitted changes, local ignored files, and installed dependencies, inherit the lpm project setup, and queue an agent task in the same flow.

  • Does lpm Duplicate copy uncommitted changes?

    Yes, by default. You can instead enable the clean-copy option to reset tracked changes and remove untracked files. You can also pull the latest upstream commit or reinstall dependencies for each copy.

  • Does every duplicate have its own Git repository?

    Yes. Every copy has an independent .git directory, so its branch, index, config, and Git operations do not depend on the source project. Commits are not automatically shared back to the original copy.

  • How much disk space does an lpm Duplicate use?

    On APFS, lpm starts with a fast copy-on-write clone, so unchanged file data is shared by the filesystem at first. Storage grows as copies diverge. lpm skips regenerable build caches and can omit and reinstall dependencies when you want a cleaner copy.

  • Can lpm run Claude Code or Codex in every copy automatically?

    Yes. The Duplicate dialog and lpm CLI can create up to 50 copies and queue a configured action or any command with a prompt on each one. The same workflow works with Claude Code, Codex, Gemini CLI, OpenCode, and other terminal-based agents.

  • When is Git worktree still the better choice?

    Choose Git worktree when you want a lightweight additional checkout, prefer shared Git refs and object storage, and already have a reliable way to initialize local files, dependencies, services, and agent sessions for every worktree.

Give every agent the whole project.Not just another checkout.

Download lpm for macOS and turn the project already on your disk into clean, standalone environments for Claude Code, Codex, and any other terminal agent.

Download for macOS
Developer ID signed · Notarized by AppleSafety, checksums & removal