Skip to content

Cleft

Git worktrees that share their disk

Start a worktree in under a second. Clean files share blocks until you change them.

git worktree addEvery block copied
Create time
4.45 s
Disk used
299.5 MiB
cleft addBlocks shared until written
Create time
0.85 s
Disk used
16.9 MiB

One worktree for every agent

Eight worktrees start at once and register together. Any agent works in its own checkout.

Measured on a large repository

vercel/next.js at HEAD, 35,856 files, Apple M5, APFS, 10 interleaved runs.

  • 5.2x

    Faster to create than git

    • cleft0.85 s
    • cleft --verify=hash1.12 s
    • git-cow2.35 s
    • git-coworktree2.97 s
    • git4.45 s
    • git-twig8.43 s
  • 17.7x

    Less disk than git

    • cleft16.9 MiB
    • git299.5 MiB
  • 2.9x

    Faster with 8 worktrees at once

    • cleft5.69 s
    • git-cow10.34 s
    • git16.61 s
    • git-coworktree17.51 s
    • git-twig28.94 s
  • 142 KiB

    One small binary

    • 0Third-party dependencies
    • CPure, no runtime to install
    • 3.37 MiBIndex, against 5.24 MiB for git

Install in a minute

Then run cleft add -b feature/work ../wt-feature.

  • Homebrew

    brew tap arcadia-eng/cleft https://github.com/arcadia-eng/cleft
    brew install cleft
    Steps for Homebrew
  • Nix

    nix profile install github:arcadia-eng/cleft
    Steps for Nix
  • Release binary

    awk -v file="$archive" '$NF == file' SHA256SUMS | sha256sum -c -
    tar -xzf "$archive"
    install -m 0755 cleft "$HOME/.local/bin/cleft"
    Steps for Release binary
  • Source

    git clone https://github.com/arcadia-eng/cleft.git
    cd cleft
    make && sudo make install
    Steps for Source

Still plain Git

  • Submodules and sparse checkouts
  • Attributes, filters and hooks
  • SHA-256 repositories
  • List, lock, move, remove and prune