# git-worktree

> Claude/Codex skill by [@davidondrej](https://omgskills.com/library/davidondrej/index.md) · 4.2k stars · Updated 2026-10-28

Use Git worktrees to isolate parallel coding tasks. Use when setting up a task checkout, working in a shared repo, or managing existing worktrees.

## Install

```sh
git clone https://github.com/davidondrej/skills /tmp/skills && ln -s /tmp/skills/skills/agent-orchestration/git-worktree ~/.claude/skills/git-worktree
```

## From README

Git Worktrees for Parallel Agents In Cloudroom ($ROOMTHREADID is set) Never run git worktree add yourself. Cloudroom only deletes worktrees it made, so hand-made ones pile up in /code forever. New task: start the thread with New worktree instead. Move this thread to its own worktree: fork it into a Cloudroom-managed worktree. Cloudroom makes the branch and deletes the folder once its last thread is archived (after the worktree retention setting, default 21 days). It branches from main, so uncommitted edits stay behind; commit them first or pass --base-branch . Then tell the user to continue in the new thread and archive this one. Skip the rest of this skill. Start here Detect where you are before editing: Primary checkout → create a task-named worktree, complete the below, and cd into it before editing. Worktree (including one created by Cursor) → proceed with the task. Working model Worktrees have separate working files and branches but share Git history, stashes, config, and refs.

## Links

- HTML page: https://omgskills.com/library/davidondrej/skills/git-worktree/
- GitHub: https://github.com/davidondrej/skills
- Author: [@davidondrej](https://omgskills.com/library/davidondrej/index.md)

## More from this repo

- [anti-sleep](https://omgskills.com/library/davidondrej/skills/anti-sleep/index.md) — Keep a Mac awake for a set duration or while a process runs.
   - [@davidondrej](https://omgskills.com/library/davidondrej/index.md) · 4.2k stars
- [adr-verbatim](https://omgskills.com/library/davidondrej/skills/skills/thinking-and-docs/adr-verbatim/index.md) — Record concise ADRs that preserve the user's decisions without conversational noise.
   - [@davidondrej](https://omgskills.com/library/davidondrej/index.md) · 4.2k stars
- [ask-then-build](https://omgskills.com/library/davidondrej/skills/skills/thinking-and-docs/ask-then-build/index.md) — Clarify a feature, change, or refactor through questions, then write a build prompt for another agent.
   - [@davidondrej](https://omgskills.com/library/davidondrej/index.md) · 4.2k stars
