git-worktree

Create, list, switch, and delete Git worktrees for parallel development.

137|20|Updated Jun 13, 2025
One-click install
npx skills add https://github.com/NikiforovAll/claude-code-rules --skill git-worktree-nikiforovall
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/NikiforovAll/claude-code-rules/tree/main/plugins/handbook-git-worktree/skills/git-worktree
Command: npx skills add https://github.com/NikiforovAll/claude-code-rules --skill git-worktree-nikiforovall

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Switching contexts in Git often requires stashing; worktrees let you explore multiple branches in parallel without losing changes.

Core Features & Use Cases

  • List worktrees: Show all active worktrees with paths, branches, and current status.
  • Create from remote/local/new: Generate worktrees from origin branches, existing local branches, or new branches.
  • Delete worktrees: Clean up and remove unused worktrees.
  • Navigation: Get ready-to-run commands to switch between worktrees.

Quick Start

Create a worktree from a remote branch: git worktree add ../myproject-feature-x origin/feature-x

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I manage multiple Git branches in parallel without stashing changes?

Git worktrees let you create separate directory instances of your repository, each checked out to a different branch. This eliminates context switching and stashing; you work on multiple branches simultaneously in isolated directories.

How do I create a Git worktree from a remote branch?

Use `git worktree add ../myproject-feature-x origin/feature-x` to create a new worktree linked to a remote branch. The command generates a sibling directory outside your main repository with the naming convention project-branch.

Can I create a worktree from a new branch that doesn't exist yet?

Yes. Git worktrees support creating worktrees from new branches, local branches, or remote branches. The Skill handles branch availability validation and creates the appropriate branch context when you add a worktree.

How do I list all active worktrees and their status?

The Skill lists all active worktrees with their paths, associated branches, HEAD commit hashes, and current status. This gives you visibility into all parallel development contexts at a glance.

How do I switch between worktrees?

The Skill provides ready-to-run navigation commands that let you switch context between worktrees. You get explicit commands to move between your parallel development directories without manual path management.

What happens when I delete a worktree?

The Skill removes unused worktrees cleanly, freeing up disk space and keeping your parallel development environment organized. Deletion includes proper cleanup of the associated directory and worktree metadata.