git-worktree

Manage Git worktrees for isolated parallel development.

1|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/AskTinNguyen/vesper-team-skills --skill git-worktree-asktinnguyen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/AskTinNguyen/vesper-team-skills/tree/main/git-worktree
Command: npx skills add https://github.com/AskTinNguyen/vesper-team-skills --skill git-worktree-asktinnguyen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Managing Git worktrees across multiple parallel features can be error-prone and hard to coordinate, leading to tangled checkouts and messy cleanups.

Core Features & Use Cases

  • Create isolated worktrees from a base branch (default main) to develop features in parallel.
  • List and switch between active worktrees with clear status and reflective branch information.
  • Automatically manage .gitignore entry for the .worktrees directory and copy environment files to new worktrees for consistent local setups.

Quick Start

Run the worktree-manager.sh script with the create command to bootstrap a new worktree.

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 feature development without tangled checkouts?

You can manage Git worktrees using a unified script that handles create, list, switch, and cleanup commands. This prevents tangled checkouts by maintaining isolated environments that automatically update from your base branch and sync .gitignore entries.

How do I copy environment files to a new Git worktree automatically?

To copy environment files to a new Git worktree, the management script includes a copy-env command. This ensures your local setup remains consistent across all parallel development branches without manual file duplication.

What is the best way to list and switch between active Git worktrees?

The best way to list and switch active Git worktrees is using the manager script's list and switch commands. It displays clear status and reflective branch information, allowing you to navigate isolated environments seamlessly during code reviews.

Does Git worktree management handle cleanup and .gitignore updates automatically?

Yes, Git worktree management handles cleanup automatically and ensures the .gitignore file is kept up to date. It automatically manages the .gitignore entry for the .worktrees directory to prevent messy repository states.

When do I need to use Git worktrees instead of standard branches?

You need Git worktrees when managing multiple parallel features, conducting code reviews, or needing isolated environment management. Worktrees allow you to checkout multiple branches simultaneously in separate directories without switching contexts in a single folder.

Can I create a Git worktree from a branch other than main?

Yes, you can create a Git worktree from different branches, though the script defaults to the main branch. It bootstraps the isolated worktree and automatically updates it from the specified base branch.