git-worktree

Manage Git worktrees for isolated parallel development with a single script.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/RafayelGardishyan/rafayels-marketplace --skill git-worktree-rafayelgardishyan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/RafayelGardishyan/rafayels-marketplace/tree/main/plugins/rafayels-engineering/.opencode/skills/git-worktree
Command: npx skills add https://github.com/RafayelGardishyan/rafayels-marketplace --skill git-worktree-rafayelgardishyan

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Git worktrees are essential for parallel development, but manually juggling multiple worktrees, ensuring proper environment setup, and keeping main and worktrees in sync is error-prone and tedious.

Core Features & Use Cases

  • Create isolated worktrees from main with automatic environment setup
  • List, switch, and clean up worktrees with safety prompts
  • Automatically manage .gitignore and environment files to reduce human error
  • Use in parallel development, code reviews, and feature experiments

Quick Start

Create a new worktree using the manager to set up an isolated feature branch from main.

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 development without manual setup errors?

You can manage Git worktrees using a single manager script that creates isolated feature branches, replicates environment files from the main repo, and automatically updates .gitignore. This reduces manual setup errors and ensures isolated parallel development across multiple features.

What is the best way to keep environment files synced across multiple Git worktrees?

The best way to sync environment files is to use an automated worktree manager that replicates environment files from the main repository into new worktrees upon creation. This ensures every isolated feature branch has the correct configuration without manual copying.

How can I list and switch between isolated feature branches in Git worktrees?

You can list and switch between isolated feature branches by using the worktree manager script. It provides a simple interface to view all active worktrees and switch contexts safely, keeping your directory structure organized under a dedicated .worktrees folder.

Can I use Git to create isolated worktrees for code reviews and feature experiments?

Yes, you can create isolated worktrees specifically for code reviews and feature experiments. The manager script applies a consistent directory structure and safety prompts to cleanly separate experimental or review branches from your main branch.

Does this Git worktree approach automatically handle .gitignore updates?

Yes, this Git worktree approach automatically manages .gitignore updates. When creating a new worktree, the manager script ensures the .gitignore file is properly configured to exclude the worktree directories, reducing human error during parallel development.

How do I safely clean up Git worktrees after finishing a feature?

You can safely clean up Git worktrees using the manager script, which includes built-in safety prompts before removal. This prevents accidental deletion and ensures your parallel development environment remains stable after a feature is complete.