git-worktree

Automates creating, listing, switching, and cleaning Git worktrees for parallel development.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/lovincyrus/claude-config --skill git-worktree-lovincyrus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/lovincyrus/claude-config/tree/main/skills/git-worktree
Command: npx skills add https://github.com/lovincyrus/claude-config --skill git-worktree-lovincyrus

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill provides a centralized, reliable way to manage Git worktrees for parallel development, reducing setup friction and ensuring consistent workflows across features.

Core Features & Use Cases

  • Create worktrees from a base branch with automatic directory structure and environment file syncing.
  • List and switch between multiple worktrees for isolated feature work.
  • Automatically update .gitignore for the .worktrees directory and maintain clean main history.
  • Safe cleanup of inactive worktrees with interactive prompts to prevent data loss.

Quick Start

Use the git-worktree skill to create a new worktree from main, list existing worktrees, switch between them, and clean up unused worktrees.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I manage Git worktrees for parallel feature development?

Git worktrees are managed through a Bash script that automates creating, listing, switching, and cleaning up isolated working directories. This enables parallel development by copying environment files from the main repository and maintaining a consistent directory structure for features.

How do I safely clean up unused Git worktrees without losing changes?

Safe cleanup of inactive Git worktrees uses interactive prompts to prevent data loss before removal. The script confirms which worktrees to delete, ensuring uncommitted changes in isolated branches are protected during the parallel development workflow.

Do I need any dependencies to use a Bash script for Git worktree automation?

No external dependencies are required to run the Git worktree manager, as it operates entirely through a Bash script. You only need a standard Bash environment with Git installed to execute the worktree automation commands.

What is the best way to switch between multiple Git worktrees?

The best way to switch between Git worktrees is using a Bash manager that lists existing working directories and facilitates switching. This ensures consistent workflows across isolated features while syncing environment files automatically.

Why does my Git worktree workflow require updating .gitignore?

Updating .gitignore is required to exclude the .worktrees directory from version control, which maintains a clean main history. This prevents isolated feature directories and copied environment files from cluttering the primary repository.