_worktree-remove

Remove Git worktrees and associated branches with change management options.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Piece-Puzzly/Piece-iOS --skill worktree-remove
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: _worktree-remove
Source: https://github.com/Piece-Puzzly/Piece-iOS/tree/main/.claude/skills/_worktree-remove
Command: npx skills add https://github.com/Piece-Puzzly/Piece-iOS --skill worktree-remove

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a robust and safe method for removing Git worktrees, ensuring that associated branches and metadata are cleaned up properly.

Core Features & Use Cases

  • Automated Cleanup: Removes Git worktrees and cleans up related branches and metadata.
  • Change Management: Handles scenarios with uncommitted changes or unmerged branches, offering options for commit, merge, or force removal.
  • Use Case: After completing a feature in a separate worktree, use this Skill to cleanly remove the worktree and merge its changes back into the main development branch.

Quick Start

Use the _worktree-remove skill to remove the worktree located at './feature-branch-worktree'.

Frequently Asked Questions about _worktree-remove

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove a Git worktree and its associated branch safely?

To safely remove a Git worktree, you can use a cleanup tool that deletes the worktree directory and prunes associated branch metadata, managing uncommitted changes through user-defined options like commit, merge, or force removal.

What happens to uncommitted changes when I delete a Git worktree?

When deleting a Git worktree, uncommitted changes are managed through user-defined options, allowing you to commit, merge, or force remove the changes rather than losing them silently during the branch cleanup process.

Can I remove a Git worktree from within the worktree directory itself?

Yes, you can remove a Git worktree from within the worktree itself, as the process handles edge cases like nested worktrees and removal from the active working directory using the Git command-line interface.

What is the best way to clean up Git worktrees after merging a feature branch?

The best way to clean up Git worktrees after merging a feature is to use an automated removal process that deletes the worktree and cleans up related branch metadata, ensuring your version control environment remains tidy.

Do I need the Git command-line interface to delete worktrees and unmerged branches?

Yes, you need the Git command-line interface installed to execute worktree removal, as the process requires Git commands to manage unmerged branches, nested worktrees, and metadata cleanup properly.

How does Git worktree removal handle nested worktrees and unmerged branches?

Git worktree removal handles nested worktrees and unmerged branches by offering specific options to manage uncommitted changes and clean up associated metadata, ensuring edge cases do not break your version control state.