git-worktree

Create and manage isolated Git worktree workspaces for parallel development.

3|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/alpoxdev/hypercore-skills --skill git-worktree-alpoxdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/alpoxdev/hypercore-skills/tree/main/skills/git-worktree
Command: npx skills add https://github.com/alpoxdev/hypercore-skills --skill git-worktree-alpoxdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill solves the friction of context switching between multiple branches or tasks by allowing you to maintain separate, isolated working directories for different features or agent sessions within a single repository.

Core Features & Use Cases

  • Parallel Workspaces: Create and manage multiple Git worktrees under a standardized project directory, enabling simultaneous development or agent sessions without file conflicts.
  • Safe Lifecycle Management: Provides robust commands for creating, listing, repairing, and safely removing worktrees, including built-in checks to prevent accidental deletion of the main repository.
  • Use Case: When you need to work on a hotfix while simultaneously running a long-running experiment or a separate AI agent session, this skill allows you to spin up a new, isolated environment instantly without stashing or switching your current branch.

Quick Start

Use the git-worktree skill to create a new isolated workspace for the feature-auth branch and move your current session into it.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I work on multiple Git branches at the same time without stashing changes?

Git worktrees let you work on multiple branches simultaneously by creating isolated working directories within a single repository, eliminating the need to stash changes or switch branches for parallel tasks.

What is the best way to run parallel AI agent sessions in the same repository?

Using Git workspaces for parallel tasks allows you to spin up isolated environments instantly for separate agent sessions, preventing file conflicts while maintaining a single repository context.

How do I safely remove a Git worktree without deleting the main repository?

Safe removal of Git worktrees requires built-in safety checks that prevent accidental deletion of the main repository, ensuring only the branch-specific directory is removed during lifecycle operations.

Can I create isolated Git workspaces for parallel development without dependencies?

Yes, you can create and manage isolated Git worktree workspaces with no external dependencies, using project-local path conventions to maintain strict safety and prevent workspace corruption.

Why does my Git workflow break when switching between a hotfix and a long-running experiment?

Switching branches breaks workflows because it disrupts long-running processes; Git worktrees solve this by maintaining separate, isolated working directories for different features within a single repository.

How do I repair a corrupted Git worktree workspace?

You can repair corrupted Git worktree workspaces using built-in lifecycle management commands that inspect and fix workspace state while enforcing strict safety checks to prevent data loss.