# Ito Using Git Worktrees

> Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification

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

---


<!-- ITO:START -->

# Using Git Worktrees

## Overview

Git worktrees create isolated workspaces that share the same repository, allowing work on multiple branches simultaneously.


**Configured strategy:** `bare_control_siblings`
**Directory name:** `ito-worktrees`
**Default branch:** `main`
**Integration mode:** `commit_pr`

## Worktree Location


Worktrees live under the bare/control layout:

```bash
../
|-- main/
`-- ito-worktrees/<change-name>/
```

Create a worktree:

```bash
mkdir -p "../ito-worktrees"
git worktree add "../ito-worktrees/<change-name>" -b <change-name> main
```

Always branch new change worktrees from `main`. Never use the bare/control repo placeholder `HEAD` as the checkout source.


Do NOT ask the user where to create worktrees.

## Path Helpers

If you need absolute paths (for logs, scripts, or agent instructions), use:

- `ito path project-root`
- `ito path worktree-root`
- `ito path worktrees-root`
- `ito path worktree --main|--branch <name>|--change <id>`

## Safety Checks

- Ensure the parent directory for the worktree exists (create it if needed).
- Run a clean baseline build/test in the new worktree so new failures are attributable.
- Do not proceed if baseline tests fail without explicitly calling that out.

## Cleanup

After the branch is merged:

```bash
ito agent instruction finish --change "<branch-name>"
```

If a worktree is locked, assume it was locked on purpose; do NOT unlock/remove it unless the user explicitly asks.



## Integration

**Called by:**
- Any workflow that needs isolated workspace

<!-- ITO:END -->

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/withakay) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

