git-worktrees

Manage multiple Git worktrees with add, list, remove, and prune commands.

1|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/yurifrl/cly --skill git-worktrees-yurifrl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktrees
Source: https://github.com/yurifrl/cly/tree/main/.opencode/skill/git-worktrees
Command: npx skills add https://github.com/yurifrl/cly --skill git-worktrees-yurifrl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers manage multiple Git worktrees for parallel feature work.

Core Features & Use Cases

  • Create and manage isolated worktrees for feature branches
  • Map branches to worktree folders for clean project structure
  • Use standard git worktree commands: add, list, remove, prune
  • Workflow: Keep worktrees independent, delete when merged, avoid stash/branch switching

Quick Start

Use git worktree add to create a new worktree: git worktree add .worktrees/<folder> -b <branch-name> List all worktrees with: git worktree list Remove a worktree with: git worktree remove .worktrees/<name> Prune stale references with: git worktree prune

Frequently Asked Questions about git-worktrees

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

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

Yes, you can avoid stashing changes by using git worktrees to maintain independent working trees. Worktrees allow you to map separate branches to distinct folders, enabling simultaneous work on different features without switching branches or stashing progress.

What is the best way to isolate bugfix branches using git worktree?

The best way to isolate bugfix branches using git worktree is to create a dedicated worktree folder for the branch. This provides an independent working tree specifically for the bugfix, keeping your main repository clean and untouched.

How do I create and map a new branch to a worktree folder?

To create and map a new branch to a worktree folder, use the command `git worktree add .worktrees/<folder> -b <branch-name>`. This sets up a new isolated working tree linked to your new branch under the specified directory.

How do I clean up and prune stale git worktree references?

To clean up and prune stale git worktree references, use the `git worktree prune` command to remove dead metadata. For active directories, use `git worktree remove .worktrees/<name>` to safely delete worktrees after their branches are merged.

When should I remove a git worktree during my version control workflow?

You should remove a git worktree once its associated feature branch is merged and the work is complete. Deleting merged worktrees prevents directory clutter and maintains a clean project structure across your repository.