git-worktree

Manage Git worktrees for parallel development across feature branches.

25|15|Updated Aug 2, 2021
One-click install
npx skills add https://github.com/JesusFilm/core --skill git-worktree-jesusfilm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/JesusFilm/core/tree/main/.claude/skills/git-worktree
Command: npx skills add https://github.com/JesusFilm/core --skill git-worktree-jesusfilm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Git worktree management in development often becomes tedious and error-prone when multiple features are developed in parallel. This skill provides a unified interface to create, list, switch, and clean up worktrees with safety prompts, automatic environment handling, and automatic updates to .gitignore.

Core Features & Use Cases

  • Create worktrees from main (or a base branch) with automatic .env copy
  • List all worktrees with current status
  • Switch between worktrees for parallel development
  • Cleanup inactive worktrees with confirmation
  • Automatically update .gitignore to include .worktrees
  • Copy environment files from the main repository to each new worktree

Quick Start

Run the worktree manager script to create a new worktree, then switch into it to begin parallel development.

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 safely?

Git worktree management automates creating, listing, switching, and cleaning up isolated branches with safety prompts to prevent accidental data loss during parallel development.

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

When creating a new worktree from the main repository, the script automatically copies environment files like .env from the main branch to ensure the isolated environment has the correct configuration.

Does Git worktree creation update .gitignore automatically?

Yes, the worktree creation workflow automatically updates your .gitignore file to include the .worktrees directory, preventing isolated development environments from being tracked in version control.

What is the best way to clean up inactive Git worktrees without losing changes?

The worktree manager removes inactive worktrees using confirmation safety prompts, ensuring that you explicitly verify and protect any uncommitted changes before deletion occurs.

Can I use a single script to create and switch between multiple Git worktrees?

Yes, a single worktree-manager.sh script provides a unified self-contained interface to generate new isolated branches and seamlessly switch your active context across parallel development tracks.