# git twig

> Git worktrees for agents. More branches, less disk.

Source: https://talira.ai/catalog/git-twig-g1mhhe1z
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / git / worktrees](https://talira.ai/categories/developer-tools/git/worktrees), [ai / agents / parallel](https://talira.ai/categories/ai/agents/parallel)
- Platforms: macos, linux, cli[^1]
- Licence: MIT[^2]
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes[^1]

git twig is a [Git](https://talira.ai/catalog/git-ab5bez9f.md) subcommand (`git twig new`) that creates ordinary linked Git worktrees from copy-on-write clones of the files in a nearby worktree, so many checkouts of the same repository share disk blocks instead of each holding a full copy. It uses APFS clonefile on [macOS](https://talira.ai/catalog/macos-8swyggxb.md) and FICLONE reflinks on Linux Btrfs and reflink-enabled XFS, verifies every cloned file against the requested commit, and lets Git write anything it can't clone; on filesystems without reflinks it falls back to stock `git worktree`. The README's benchmarks show new worktrees using from 2x to over 150x less additional disk than `git worktree`. It ships a skill for coding agents (`git twig skill`), and an unreleased `adopt` command moves existing worktrees into a sibling layout and, on macOS, compacts matching files into clones.

## Links

- Website: https://twig.leostera.dev
- GitHub: https://github.com/leostera/git-twig

## Problems it solves

- every git worktree my coding agents create is another full copy of the repo on disk
- ten parallel agent checkouts of a big monorepo are eating my laptop's SSD
- make new git worktrees share unchanged files with copy-on-write instead of duplicating them
- create a worktree for a feature branch that takes almost no extra disk space on APFS
- use reflinks on Btrfs or XFS so extra checkouts of the same repository are nearly free
- tell my coding agent how and where to create worktrees for each task without hand-holding
- my existing worktrees are scattered inside the main clone and I want them moved beside it safely
- reclaim space from old worktrees that hold identical copies of the same files
- a worktree tool that checks cloned files really match the commit before handing the checkout over

## Features

- git twig new: linked worktrees built from copy-on-write file clones
- APFS clonefile on macOS; FICLONE on Btrfs and reflink-enabled XFS on Linux
- verifies cloned files against the requested commit; writes are private, never hardlinked
- reuses matching files from nearby worktrees across different revisions (0.5.0)
- falls back to stock git worktree on filesystems without clone support
- handles common LF checkout policies and builtin ident/encoding conversions
- bundled skill for coding agents: git twig skill
- adopt: moves existing worktrees into a sibling layout, with a dry run (unreleased)
- offline compaction on macOS replaces matching files in existing worktrees with clones (unreleased)
- TWIG_TRACE=1 shows which backend each create used

## Limitations

- Doesn't save disk on ext4 or other filesystems without reflinks: there it falls back to stock git worktree[^1]
- Doesn't copy uncommitted changes or ignored files into a new worktree: it checks out committed files only[^1]
- Doesn't manage agent sessions or replace an agent app's own built-in worktree creation[^1]

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.56 out of 1.
Signals: maintenance 1.00, adoption 0.48, momentum 0.73, community 0.19, backing 0.00, extensibility 0.20.

- last commit 5 days ago
- 133 commits in the last 90 days
- latest release v0.5.0 6 days ago
- 264 GitHub stars
- 2 contributors
- accepts sponsorship (Github)

Warnings:

- young project (first commit 8 days ago)
- one or two maintainers (bus factor)

## Alternatives

- [PwrGit](https://talira.ai/catalog/pwrgit-xenhs931.md): Git for people working alongside an agent
- [Worktrunk](https://talira.ai/catalog/worktrunk-7ytbppma.md): A CLI for Git worktree management, designed for parallel AI agent workflows
- [gtr (Git Worktree Runner)](https://talira.ai/catalog/gtr-git-worktree-runner-2vwtyqsh.md): A portable Git worktree CLI for PR reviews, coding agents, and repeatable per-branch setup
- [CCManager](https://talira.ai/catalog/ccmanager-vem1rrj2.md): Coding Agent Session Manager for Claude Code / Gemini CLI / Codex CLI / Cursor Agent / Copilot CLI / Cline CLI / OpenCode / Kimi CLI

## Sources

[^1]: https://github.com/leostera/git-twig/blob/main/README.md (checked 19 Nov 2026)
[^2]: https://github.com/leostera/git-twig/blob/main/LICENSE (checked 19 Nov 2026)
