managing-git-worktrees

Create and manage Git worktrees with wt- prefix naming and submodule-aware operations.

2|2|Updated Feb 9, 2017
One-click install
npx skills add https://github.com/sumik5/dotfiles --skill managing-git-worktrees
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: managing-git-worktrees
Source: https://github.com/sumik5/dotfiles/tree/main/claude-code/skills/managing-git-worktrees
Command: npx skills add https://github.com/sumik5/dotfiles --skill managing-git-worktrees

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill explains Git Worktree usage for parallel development, with naming rules, conflict avoidance, and best practices, including user confirmation flows.

Core Features & Use Cases

  • Worktree naming & creation: wt- prefixed directories for parallel work.
  • Conflict avoidance: Avoid creating worktrees in parent repos for submodules.
  • Recovery & troubleshooting: Pruning and repair guidance.

Quick Start

Create a new worktree for a feature branch from main and verify it is correctly listed.

Frequently Asked Questions about managing-git-worktrees

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

FAQPage Schema
How do I set up parallel Git worktrees for concurrent feature development?

Create parallel Git worktrees using the wt- prefix naming convention and place them at your project root. Each worktree lets you work on different branches simultaneously without switching contexts, enabling concurrent feature development across your team.

What's the best way to avoid conflicts when creating worktrees in projects with submodules?

Avoid creating worktrees in parent repositories that contain submodules; instead, create worktrees within the submodule itself. This prevents conflicts and ensures submodule-aware operations function correctly across your parallel development workflow.

How do I manage the lifecycle of Git worktrees—creation, usage, and cleanup?

Create worktrees with wt- prefixed names at project root, use each for isolated feature work, then delete them after merging. Prune stale worktree references regularly and repair corrupted entries to maintain a clean, functional worktree environment.

Do I need to replicate environment files when setting up new worktrees?

Yes, replicate .env and .serena configuration files into each new worktree to ensure environment consistency. This replication satisfies technical requirements and prevents configuration drift across your parallel development instances.

When should I not use Git worktrees for my development workflow?

Avoid worktrees if your project structure doesn't support multiple concurrent checkouts or if you lack coordination between team members (PO, Manager, Developer agents). Worktrees require intentional lifecycle management; neglecting pruning and repair can degrade repository health.