git-worktree

Manage Git worktrees for isolated parallel development workflows.

2|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/CristoVentures/LocalCents --skill git-worktree-cristoventures
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/CristoVentures/LocalCents/tree/main/.agent/skills/git-worktree
Command: npx skills add https://github.com/CristoVentures/LocalCents --skill git-worktree-cristoventures

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Git worktrees are powerful but handling them directly can lead to mistakes, scattered commands, and inconsistent workflows. This skill provides a unified, interactive manager that creates, lists, switches, and cleans up worktrees in a safe, opinionated way.

Core Features & Use Cases

  • Create worktrees from a main branch with clear naming and guardrails
  • List all worktrees with their current status and branches
  • Switch between worktrees and open a targeted workspace quickly
  • Cleanup inactive worktrees with confirmation and safety checks
  • Automatic .gitignore management for the .worktrees directory
  • Copy environment files from the main repository into new worktrees to preserve local config

Quick Start

Run the worktree-manager script to create a new worktree and follow the on-screen prompts.

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 safely without scattered commands?

Manage git worktrees safely through an interactive manager script that creates, lists, switches, and cleans up worktrees with guardrails and confirmations. It prevents scattered commands and inconsistent workflows by unifying operations into a single tool.

How does git worktree creation handle environment files and .gitignore?

Git worktree creation automatically copies environment files from the main repository into new worktrees to preserve local config. It also enforces .gitignore inclusion for the .worktrees directory, ensuring worktrees remain isolated from the main repo tracking.

What's the best way to switch between git worktrees for parallel feature development?

Switch between git worktrees using a single manager script that lists all worktrees with their current status and branches. It opens a targeted workspace quickly, enabling isolated parallel development without manual directory navigation.

Can I clean up inactive git worktrees without accidentally deleting active branches?

Clean up inactive git worktrees safely with confirmation prompts and safety checks enforced by the manager script. These guardrails ensure active worktrees and branches remain intact during cleanup operations.

Does git worktree management work without a main repository?

Git worktree management relies on the main repository as its foundation. The manager script orchestrates worktree operations from a main branch, requiring an existing repo to create isolated directories for parallel code review and feature development workflows.