git-worktree

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill simplifies the management of Git worktrees, allowing developers to isolate parallel development tasks without the complexity of manual Git commands.

Core Features & Use Cases

  • Create Worktrees: Easily create new worktrees from a specified branch, automatically copying environment files.
  • List & Switch: View all active worktrees and seamlessly switch between them.
  • Cleanup: Safely remove completed worktrees.
  • Use Case: When working on a new feature, create a dedicated worktree to avoid disrupting your main development branch. Later, switch to another worktree for a quick bug fix, then return to your feature work.

Quick Start

Use the git-worktree skill to create a new worktree for the branch named 'feature-login'.

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 isolated parallel development?

Managing git worktrees for isolated parallel development involves creating dedicated working directories from existing branches. This skill automates worktree creation, listing, switching, and cleanup to handle multiple tasks without disrupting your main branch.

How do I copy environment files when creating a new git worktree?

Copying environment files when creating a new git worktree is handled automatically by this skill. It ensures your environment configurations are copied to the new worktree directory and updates your .gitignore file to prevent sensitive data leaks.

What is the best way to switch between git worktrees for feature development and bug fixes?

The best way to switch between git worktrees for feature development and bug fixes is to use a dedicated worktree manager. This skill allows you to view all active worktrees and seamlessly switch contexts without stashing changes or cloning repositories.

Does git worktree workflow support integration with code review processes?

Git worktree workflow supports integration with code review processes by isolating feature branches in separate directories. You can develop, test, and review code in an isolated worktree before safely removing it during cleanup.

How do I safely remove completed git worktrees during cleanup?

Safely removing completed git worktrees during cleanup is automated by this skill. It handles the deletion of the working directory and cleans up associated branch references, ensuring your repository structure remains intact without manual git commands.