git-worktree

Create, list, switch, and clean up Git worktrees via bash scripts.

461|129|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/davekilleen/Dex --skill git-worktree-davekilleen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/davekilleen/Dex/tree/main/.claude/plugins/compound-engineering/skills/git-worktree
Command: npx skills add https://github.com/davekilleen/Dex --skill git-worktree-davekilleen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the management of Git worktrees, providing a simple, interactive way to handle isolated development environments for parallel tasks like code reviews and feature development.

Core Features & Use Cases

  • Create Worktrees: Easily create new worktrees from a specified branch, automatically copying environment files and managing .gitignore.
  • List & Switch: View all active worktrees and seamlessly switch between them.
  • Cleanup: Safely remove completed or inactive worktrees.
  • Use Case: When working on a new feature, you can create a dedicated worktree for it, keeping your main branch clean. Later, if you need to quickly review a pull request, you can create another worktree for that specific branch without disrupting your current work.

Quick Start

Use the git-worktree skill to create a new worktree for the branch named 'feature-login'.

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 development without disrupting my current branch?

You can manage Git worktrees for parallel development by creating isolated environments for new features or code reviews, keeping your main branch clean. The process lists, switches between, and safely removes worktrees without disrupting ongoing work.

What is the best way to create a Git worktree for a new feature branch?

The best way to create a Git worktree for a feature branch is using an interactive interface that executes Git commands via bash scripts. This automatically copies your environment files and manages your `.gitignore` configuration during creation.

Can I review pull requests using a separate Git worktree without losing my current work?

Yes, you can review pull requests in a dedicated Git worktree without losing your current work. By creating an isolated worktree for the specific pull request branch, you maintain your active development context while performing the code review.

How do I clean up completed Git worktrees after finishing feature development?

To clean up completed Git worktrees after finishing feature development, you can safely remove inactive or completed worktrees through the interactive interface. This ensures the isolated parallel development environments are deleted without affecting the main repository.

Does managing Git worktrees require manual environment file setup for each new branch?

No, managing Git worktrees does not require manual environment file setup. When creating a new worktree from a specified branch, the process automatically copies environment files and manages `.gitignore` configurations for you.

Why use Git worktrees instead of cloning a repository multiple times for parallel tasks?

Git worktrees provide isolated parallel development environments within a single repository, avoiding the disk space overhead and history synchronization issues of multiple clones. You can seamlessly switch between active worktrees for features and code reviews.