using-git-worktrees

Create isolated git worktrees for feature development across multiple branches.

69|9|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/coctostan/pi-superpowers --skill using-git-worktrees-coctostan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/coctostan/pi-superpowers/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/coctostan/pi-superpowers --skill using-git-worktrees-coctostan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Efficiently isolate feature work by creating and managing dedicated git worktrees, so you can work on multiple branches without disturbing the main workspace.

Core Features & Use Cases

  • Automatic directory selection: prioritizes existing local worktrees (.worktrees or worktrees) and honors project configuration before prompting the user.
  • Safety verification: validates ignore rules with git check-ignore to prevent accidentally committing worktree contents and fixes ignore files when needed.
  • End-to-end workflow: creates the worktree, checks out the target branch, runs project setup steps (where applicable), and reports the exact location for collaboration or handoff.

Quick Start

Ask me to set up an isolated worktree for a new feature by specifying the target branch name.

Frequently Asked Questions about using-git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create isolated git worktrees for feature development?

To create isolated git worktrees, the system sets up dedicated workspaces by creating a git worktree for your target branch, checking it out, and running project setup steps. It automatically discovers existing local worktree directories like .worktrees before prompting you for a location.

What is the best way to manage multiple git branches without disturbing the main workspace?

Managing multiple git branches without disturbing the main workspace is done by creating isolated git worktrees. This approach establishes separate working directories for each feature branch within a single repository, ensuring your primary working directory remains untouched.

How do I prevent accidentally committing git worktree contents?

To prevent accidentally committing git worktree contents, the setup process validates ignore rules using git check-ignore. This safety verification ensures worktree directories are properly ignored and automatically fixes ignore files when needed.

Can I use a global directory location for git worktrees instead of a project-local one?

Yes, you can use a global directory location for git worktrees. The system supports both project-local and global worktree locations, prioritizing existing local directories like .worktrees and honoring project configuration before prompting you for a preferred path.

Does setting up git worktrees run optional project setup steps after checkout?

Yes, setting up git worktrees runs optional project setup steps after checking out the target branch. The workflow creates the worktree, checks out the branch, executes any applicable setup commands, and reports the exact location for immediate use.