using-git-worktrees

Create isolated git worktrees with branch setup and project initialization.

4|Updated Oct 3, 2025
One-click install
npx skills add https://github.com/apexbusiness-systems/APEX-OmniHub --skill using-git-worktrees-apexbusiness-systems
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/apexbusiness-systems/APEX-OmniHub/tree/main/.cursor/superpowers/skills/using-git-worktrees
Command: npx skills add https://github.com/apexbusiness-systems/APEX-OmniHub --skill using-git-worktrees-apexbusiness-systems

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees provide isolated workspaces that share the same repository, enabling concurrent feature work without polluting the main working directory. This skill streamlines the creation, selection, and safety checks needed to establish a clean isolation environment before implementing changes.

Core Features & Use Cases

  • Directory selection priority: use .worktrees if present, then worktrees, otherwise prompt for preference.
  • Safety verification: ensures .gitignore excludes worktrees to prevent accidental commits of worktree contents.
  • Automated setup: detects the project name, creates a new worktree for a given branch, and runs project setup (e.g., npm install, cargo build, pip install) as needed.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace for your current project.

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 work?

To create isolated git worktrees, the skill detects your project name, selects a directory preference, verifies .gitignore excludes the worktree path, and creates the new branch workspace automatically.

What's the best way to manage concurrent feature branches without polluting the main git working directory?

Git worktrees provide isolated workspaces sharing the same repository, enabling concurrent feature work. This skill streamlines creation and safety checks to establish a clean isolation environment before implementing changes.

How do I ensure my git worktree contents are not accidentally committed?

Ensuring .gitignore excludes worktree directories prevents accidental commits of worktree contents. The skill performs this safety verification automatically before creating the isolated branch workspace.

Does the git worktree creation process handle project setup for toolchains like npm or cargo?

Yes, the git worktree creation process runs automated project setup for common toolchains. It executes commands like npm install, cargo build, or pip install as needed after creating the worktree.

Where should isolated git worktrees be stored in a local development environment?

Isolated git worktrees should be stored in a .worktrees directory if present, then a worktrees directory, otherwise the skill prompts for your directory preference before creating the isolated branch.