using-git-worktrees

Create isolated Git worktrees with deterministic branch names and directory selection.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Postalocity/template-microsite --skill using-git-worktrees-postalocity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/Postalocity/template-microsite/tree/main/.opencode/skills/superpowers--using-git-worktrees
Command: npx skills add https://github.com/Postalocity/template-microsite --skill using-git-worktrees-postalocity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees provide isolated development spaces that share the same repository history, enabling concurrent feature work without polluting the main checkout or risking accidental commits to the wrong branch.

Core Features & Use Cases

  • Isolated Worktree Creation: Automatically create project-local or global worktrees with deterministic branch names and directory selection.
  • Safety & Validation: Verify ignore rules prior to creation to prevent leaking worktree contents into the main repository.
  • Flexible Scenarios: Works across typical projects, including single-repo workflows and multi-branch experiments, with adaptive workspace placement based on user preferences.

Quick Start

Create an isolated git worktree for a feature branch in the current repository.

Frequently Asked Questions about using-git-worktrees

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

FAQPage Schema
What is a git worktree and when do I need isolated workspaces for feature development?

A git worktree is an isolated workspace linked to the same repository history, needed when starting feature development that requires branch isolation to prevent accidental commits and pollution of the main checkout.

How do I create a git worktree without leaking branch files into the main repository?

To create a git worktree safely, verify git ignore rules prior to creation to prevent leaking worktree contents into the main repository, then use deterministic branch names and priority-based directory discovery for safe placement.

Can I set up git worktrees in global locations outside my main project directory?

Yes, you can create git worktrees across local or global locations using adaptive workspace placement, applying priority-based directory discovery to safely select the worktree location based on your preferences.

What is the best way to manage multiple feature branches concurrently without switching checkouts?

The best way to manage concurrent feature work is creating isolated git worktrees, enabling deterministic worktree setup for multi-branch experiments while keeping the main checkout clean and preventing accidental commits to the wrong branch.

Why should I verify git ignore rules before setting up a new worktree?

Verifying git ignore rules before worktree setup is a safety guardrail to prevent leaking worktree contents into the main repository, ensuring your isolated feature branch files remain properly separated during development.

Does using git worktrees require additional dependencies or tools to isolate feature work?

No, creating isolated git workspaces requires no additional dependencies, applying built-in git branching and directory isolation to safely separate feature work without risking pollution of the main branch.