git worktrees
The mechanics of git worktrees, and why they became load-bearing for agent work.
Git: Cannot Delete Branch Used by a Worktree
Git refuses to delete a branch a worktree has checked out, even with -D. Find the worktree with git worktree list, remove it, then delete the branch.
git worktree add: Every Form of the Command
git worktree add with a new branch, an existing branch, a remote branch, a commit, or a detached HEAD. Every flag that matters, with examples and errors.
Git Worktree vs Branch (vs Multiple Clones)
A branch switches one working copy in place. A worktree adds a second on the same history. A clone gives you a whole separate repo. When to use each.
A Git Worktree Workflow That Stays Tidy
Where to put worktrees, how to name them, what to do about node_modules and .env, and when to remove them. The habits that keep worktrees from sprawling.
Git Worktrees in Cursor, Zed, and IntelliJ
How each editor handles git worktrees: Cursor's agent worktrees, Zed's worktree picker, IntelliJ's Worktrees tab, and the one thing that works everywhere.
How to Remove a Git Worktree
git worktree remove deletes a directory and its metadata. git worktree prune cleans up directories you deleted by hand. Neither deletes the branch.
How to Use Git Worktrees with Claude Code
Claude Code worktrees explained: the --worktree flag, the git commands behind it, real parallel-agent workflows, the gotchas, and how to automate it.
Why Your Claude Code Agents Keep Overwriting Each Other's Files
Running multiple Claude Code agents on the same repo? Why they conflict and how to fix it with isolated worktrees.
How to Run Two Claude Code Agents on the Same Repo Without Destroying Your Git History
Multitasking with two Claude Code agents on the same branch causes merge conflicts. The fix is git worktrees, and you can automate it.