Worktree Management

Create, list, sync, and remove Git worktrees for parallel feature development.

3|1|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/vanman2024/dev-lifecycle-marketplace --skill worktree-management-vanman2024
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Worktree Management
Source: https://github.com/vanman2024/dev-lifecycle-marketplace/tree/main/.archive/old-numbered-plugins/04-iterate/skills/worktree-management
Command: npx skills add https://github.com/vanman2024/dev-lifecycle-marketplace --skill worktree-management-vanman2024

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Working on multiple features or bug fixes simultaneously in a single Git repository can lead to constant branch switching, context loss, and potential conflicts. This skill simplifies parallel development using Git worktrees.

Core Features & Use Cases

  • Worktree Creation & Management: Provides scripts (create-worktree.sh, remove-worktree.sh) to easily create new worktrees for feature branches, list active worktrees, and clean up completed ones.
  • Parallel Development Support: Enables developers to isolate work on separate branches in distinct directories, allowing seamless switching between features without affecting the main project.
  • Worktree Synchronization: Guides on how to sync worktrees with the main branch to keep them up-to-date before merging, minimizing merge conflicts.
  • Best Practices: Offers advice on using worktrees for long-running features, consistent naming, and regular cleanup, promoting efficient workflows.
  • Use Case: A developer needs to work on two independent features concurrently without constantly stashing changes or switching branches. This skill allows them to create separate Git worktrees for each feature, isolating their development environments and enabling parallel work.

Quick Start

Create a new Git worktree for a branch named 'feature-auth' in a sibling directory, then list all active worktrees.

Frequently Asked Questions about Worktree Management

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

FAQPage Schema
How do I work on multiple Git branches simultaneously without constant switching?

Git worktrees enable parallel development by creating isolated directories for each branch. You can work on separate features concurrently, each in its own worktree, eliminating branch switching overhead and context loss while keeping changes independent until ready to merge.

What's the best way to set up parallel feature development in a single repository?

Create separate Git worktrees for each feature branch using deterministic scripts. This approach isolates workspaces, allows seamless switching between features, and maintains a clean main branch without stashing or conflicts during concurrent development.

How do I keep my worktrees synchronized with the main branch before merging?

Worktree synchronization scripts update each isolated workspace with main branch changes, minimizing merge conflicts. Regular sync before merging ensures your feature branches integrate smoothly and reduces integration friction.

Can I manage multiple worktrees efficiently with automation scripts?

Yes. Automated scripts create, list, and remove worktrees deterministically, handling worktree lifecycle management. This ensures reliable isolation, predictable behavior, and up-to-date branch tracking across all active worktrees.

When should I use Git worktrees instead of branch switching for development workflows?

Use worktrees when developing long-running features or handling multiple concurrent tasks. Worktrees prevent context loss, eliminate stashing workflows, and keep work environments separate—ideal for teams managing independent features simultaneously.

What cleanup and maintenance practices keep worktrees organized?

Regular removal of completed worktrees using automated scripts, consistent naming conventions, and periodic synchronization maintain workflow efficiency. These practices prevent workspace clutter and ensure predictable repository state during parallel development.