# Git Worktree

> Manage git worktrees for parallel development — create, list, and remove isolated working directories.

- Skill: `thinkfleetai/git-worktree` (Agent Skill)
- Install (CLI): `npx skillmds@latest add thinkfleetai/git-worktree`
- Raw SKILL.md: https://api.skillmd.com/api/skills/thinkfleetai/git-worktree/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: thinkfleetai (https://skillmd.com/u/thinkfleetai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/thinkfleetai/git-worktree

---


# Git Worktree

Manage git worktrees for parallel, isolated development.

## Create a worktree

```bash
git worktree add .worktrees/IDENTIFIER -b feature/IDENTIFIER main
```

Creates a new worktree at `.worktrees/IDENTIFIER` on branch `feature/IDENTIFIER` based off `main`.

## List worktrees

```bash
git worktree list
```

Shows all active worktrees with their paths, HEAD commits, and branch names.

## Remove a worktree

```bash
git worktree remove .worktrees/IDENTIFIER --force
git branch -D feature/IDENTIFIER
```

Removes the worktree directory and deletes the associated branch.

## Prune stale worktrees

```bash
git worktree prune
```

Cleans up stale worktree references (e.g., after manually deleting a directory).

## Notes

- Worktrees allow multiple branches to be checked out simultaneously in separate directories.
- Each worktree has its own working directory but shares the same `.git` repository.
- Always confirm before removing worktrees that may contain uncommitted changes.

