git-worktree

Create, list, switch, and clean up Git worktrees with environment file copying.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/jaydubya818/New_baseline --skill git-worktree-jaydubya818
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/jaydubya818/New_baseline/tree/main/skills/compound-engineering/plugins/compound-engineering/skills/git-worktree
Command: npx skills add https://github.com/jaydubya818/New_baseline --skill git-worktree-jaydubya818

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, mise, direnv, and includes scripts (resource) components.

What problem does it solve?

Git Worktree Manager solves the complexity of juggling multiple worktrees by providing a single interface to create, list, switch, copy env files, and clean up isolated development branches.

Core Features & Use Cases

  • Create worktrees from main branch with clear branch names
  • List worktrees with current status
  • Switch between worktrees for parallel feature work
  • Clean up completed worktrees automatically
  • Interactive confirmations at each step
  • Automatic .gitignore management for .worktrees
  • Copies environment files from main repo to new worktrees
  • Dev tool trust integration (mise/direnv) with guardrails

Quick Start

Run the worktree-manager.sh script to create a new worktree from main, or manage existing worktrees with list, switch, copy-env, and cleanup commands.

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 losing my environment setup?

This Skill manages git worktrees by automating creation, switching, and cleanup of isolated branches. It automatically copies environment files from the main repository to new worktrees to ensure synchronized parallel development.

Can I use mise and direnv with automated git worktree workflows?

Yes, the git worktree workflow includes dev tool trust integration for mise and direnv. It enforces safety guardrails and manages .gitignore configurations automatically when creating new isolated worktrees.

What is the best way to clean up completed git worktrees across multiple branches?

The best way to clean up completed git worktrees is using the script-driven cleanup command, which automatically removes finished worktrees and manages .gitignore configurations with interactive confirmations at each step.

Do I need git installed to automate worktree creation and switching?

Yes, git is a required dependency to automate worktree creation, listing, switching, and cleanup. You also need mise and direnv installed to enable the environment file synchronization and trust guardrail features.

How does .gitignore management work for parallel development worktrees?

The workflow automatically manages .gitignore entries for the .worktrees directory, ensuring that isolated worktrees created from the main branch remain properly excluded from version control tracking.