Skip to content
On this page

    Making Git Worktrees Painless for Parallel Agents

    2 min read

    I keep telling agents to split into separate worktrees, but git worktree add UX is rough.

    These three tools make the flow brainless: one-line creation, optional copying of ignored files, and tmux/editor hooks for agent windows.

    git-wt: Minimalist Subcommand

    git-wt GitHub Repo · tiny Git subcommand

    go install github.com/k1LoW/git-wt@latest
    git wt feature/auth   # create branch + worktree + cd
    git wt -d feature/auth # safe delete branch + worktree
    • Shell init adds completions + git() wrapper so git wt <branch> auto-CDs into the worktree. Add --no-switch-directory if you only want completions.
    • Config lives in git config (e.g., wt.basedir="../{gitroot}-wt"). Flags override per-run.
    • Can auto-copy ignored/untracked/modified files into the new worktree (wt.copyignored, wt.copyuntracked, wt.copymodified) and exclude patterns with wt.nocopy.

    workmux: tmux-Native Worktrees for Agents

    Workmux GitHub Repo · tmux-first worktree manager

    brew install raine/workmux/workmux
    workmux add feature/auth   # creates worktree + tmux window with panes
    workmux merge              # merge + clean branch/worktree/window
    • Opinionated “one worktree = one tmux window” with pane layouts from .workmux.yaml; good defaults if you skip config.
    • Hooks and file ops let you auto-copy .env, symlink caches, and run setup commands before the window opens.
    • Agent-friendly: supports injected prompts, status icons in tmux, /worktree slash command for Claude Code, LLM-generated branch names.
    • --with-changes moves your current uncommitted changes into the new worktree (optional --patch / --include-untracked).

    git-worktree-runner (git gtr): Cross-Platform QoL

    Git Woktree Runner GitHub Repo · cross-platform CLI

    git gtr new feature/auth         # create worktree directory
    git gtr editor feature/auth      # open in Cursor/VS Code/Zed
    git gtr ai feature/auth          # launch configured AI tool
    git gtr copy feature/auth -- ".env*"  # sync envs
    • Ships as git gtr subcommand; config via git config or .gtrconfig.
    • Hooks (gtr.hook.postCreate) and copy rules (gtr.copy.include/dirs) reduce setup; gtr.run executes commands inside a worktree.
    • Cross-platform (macOS/Linux/Windows via Git Bash) with completions.

    My Take

    • For barebones CLI, git-wt is the fastest mental model.
    • If you live in tmux and want agents visible per window, workmux is the move.
    • If you need editor/AI adapters and cross-platform support, git gtr is most batteries-included.
    • Regardless of tool, copy/symlink .env/node_modules patterns so new worktrees aren’t broken, and always clean up with the tool’s remove/merge command to avoid stale metadata.