# using-git-worktrees

> Claude/Codex skill by [@obra](https://omgskills.com/library/obra/index.md) · 301k stars · 234k installs · Updated 2026-10-10

Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback

Tags: ai, brainstorming, coding, obra, sdlc, skills, subagent-driven-development, superpowers

## Install

```sh
git clone https://github.com/obra/superpowers /tmp/superpowers && ln -s /tmp/superpowers/skills/using-git-worktrees ~/.claude/skills/using-git-worktrees
```

## From README

Using Git Worktrees Overview Ensure work happens in an isolated workspace. Prefer your platform's native worktree tools. Fall back to manual git worktrees only when no native tool is available. Core principle: Detect existing isolation first. Then use native tools. Then fall back to git. Never fight the harness. Announce at start: "I'm using the using-git-worktrees skill to set up an isolated workspace." Step 0: Detect Existing Isolation Before creating anything, check if you are already in an isolated workspace. Submodule guard: GITDIR != GITCOMMON is also true inside git submodules. Before concluding "already in a worktree," verify you are not in a submodule: If GITDIR != GITCOMMON (and not a submodule): You are already in a linked worktree. Skip to Step 2 (Project ). Do NOT create another worktree. Report with branch state: On a branch: "Already in isolated workspace at on branch ." Detached HEAD: "Already in isolated workspace at (detached HEAD, externally managed).

## Links

- HTML page: https://omgskills.com/library/obra/superpowers/using-git-worktrees/
- GitHub: https://github.com/obra/superpowers
- Author: [@obra](https://omgskills.com/library/obra/index.md)

## More from this repo

- [systematic-debugging](https://omgskills.com/library/obra/superpowers/systematic-debugging/index.md) — Used when encountering any bug, test failure, or unexpected behavior, before proposing fixes
   - [@obra](https://omgskills.com/library/obra/index.md) · 317k stars
- [executing-plans](https://omgskills.com/library/obra/superpowers/executing-plans/index.md) — Used when executing an implementation plan in the current session as the implementer yourself — your human partner...
   - [@obra](https://omgskills.com/library/obra/index.md) · 308k stars
- [subagent-driven-development](https://omgskills.com/library/obra/superpowers/subagent-driven-development/index.md) — Used when executing implementation plans with independent tasks in the current session
   - [@obra](https://omgskills.com/library/obra/index.md) · 308k stars
