using-git-worktrees

Create isolated git worktrees with safety verification and directory selection.

69|19|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/alffei/skill_share --skill using-git-worktrees-alffei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/alffei/skill_share/tree/main/superpowers-antigravity/skills/using-git-worktrees
Command: npx skills add https://github.com/alffei/skill_share --skill using-git-worktrees-alffei

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a safe, automated way to create isolated git worktrees for feature development, preventing interference with the main workspace.

Core Features & Use Cases

  • Directory isolation: Creates isolated worktrees for new features without disrupting current work.
  • Safety verification: Checks that worktrees are ignored by git to prevent accidental commits.
  • Flexible location: Supports project-local or global worktree directories and automatically detects project name.
  • Use Case: When starting a new feature branch, set up an isolated workspace and begin implementing features safely.

Quick Start

Use the skill to set up a new isolated workspace for your current project. It will pick a directory, verify ignore rules, and create a new git worktree, then switch to that directory.

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 an isolated git worktree for feature development?

Git worktrees allow you to isolate feature work by creating separate working directories from a single repository. This prevents interference with your main workspace and keeps feature development safely separated during implementation.

What is the best way to isolate feature branches without disrupting my current workspace?

Using git worktrees is the best way to isolate feature branches without disrupting your current workspace. This approach creates separate working directories, allowing safe feature development while keeping your main project intact.

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

Yes, you can use a global directory for git worktrees. The setup supports flexible location selection, automatically detecting your project name and allowing you to isolate worktrees either locally or globally.

How do I prevent accidental commits when setting up a new git worktree?

To prevent accidental commits when setting up a new git worktree, you must verify that the worktree directory is properly ignored by git. Safety checks ensure the isolated directory is ignored before starting work.

Does git worktree isolation work with automated project setup?

Yes, git worktree isolation supports automated project setup. The process handles directory selection, applies safety checks, verifies ignore rules, and switches to the new isolated workspace automatically when possible.

When should I not use git worktrees for version control?

You should avoid using git worktrees if your workflow does not require strict directory isolation or if you cannot safely ignore the worktree directory in git, as this risks accidental commits and interference.