A drop-in git worktree add

Git worktrees without the second copy.

Same command. Same result. None of the bytes.

git worktree add1816 MB
git sprout add36 MB
One worktree of the Linux kernel — 95 299 files, 2.0 GB. The new worktree shares its blocks with a checkout you already have, until something writes to them.
  • It is the same command

    Every flag git worktree add takes, the same output, the same hooks, the same index. If you can tell the difference, that is a bug.

  • The files are shared, not copied

    Your new worktree points at the blocks a checkout you already have is using. Edit either one and only the changed blocks start costing anything.

  • Nothing to configure

    No plugin, no integration, no change to your repository. On a filesystem that cannot share blocks it quietly runs git worktree add.

Install

One command.

brew install alltuner/tap/git-sprout

Then git sprout add ../feature -b feature, exactly where you would have typed git worktree add.