# Git Worktrees

> Create, list, and remove git worktrees for parallel agent work. Use when you need isolated workdirs, new worktree branches, or safe cleanup workflows.

- Skill: `joernstoehler/git-worktrees` (Agent Skill)
- Install (CLI): `npx skillmds@latest add joernstoehler/git-worktrees`
- Raw SKILL.md: https://api.skillmd.com/api/skills/joernstoehler/git-worktrees/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: JoernStoehler (https://skillmd.com/u/joernstoehler)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/joernstoehler/git-worktrees

---


# Git Worktrees

## Canonical path

All worktrees go in `/workspaces/worktrees/`. This is a bind mount configured in devcontainer.json.

Example: `/workspaces/worktrees/materials-authoring`

## Use the project scripts

- Create: `scripts/worktree-new.sh /workspaces/worktrees/<name> <branch> [--force]`
- Remove: `scripts/worktree-remove.sh /workspaces/worktrees/<name> [--force]`
- List: `git worktree list`

## Notes

- The scripts validate the repo state and install npm deps after creation.
- Use `--force` only when you understand the safety checks you are bypassing.
- Cleanup order: remove the worktree first, then delete the branch.

