worktree-merge

Merge a git worktree to the main branch and remove its VS Code workspace folder.

Updated Nov 9, 2025
One-click install
npx skills add https://github.com/manifoldlogic/claude-code-plugins --skill worktree-merge-manifoldlogic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-merge
Source: https://github.com/manifoldlogic/claude-code-plugins/tree/main/plugins/worktree/skills/worktree-merge
Command: npx skills add https://github.com/manifoldlogic/claude-code-plugins --skill worktree-merge-manifoldlogic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires crewchief, workspace-folder.sh, and includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of merging a git worktree back to the main branch and cleaning up your workspace, reducing manual steps and potential errors.

Core Features & Use Cases

  • Merge Worktree: Merges a specified worktree to the main branch, ensuring the changes are applied correctly.
  • Cleanup Workspace: Removes the worktree from the VS Code workspace file, tidying up your project environment.
  • Use Case: After completing work in a git worktree, use this Skill to automatically merge your changes into the main branch and clean up the workspace, ready for the next phase of development.

Quick Start

Run the merge-worktree.sh script within your worktree directory, e.g., merge-worktree.sh.

Frequently Asked Questions about worktree-merge

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

FAQPage Schema
How do I merge a git worktree back to the main branch and clean up the workspace?

Run the merge-worktree.sh script within your worktree directory to merge a git worktree back to the main branch and automatically remove the worktree folder from the VS Code workspace file.

What steps are required to sync a worktree merge with the main branch?

Syncing a worktree merge with the main branch requires PR status verification, main branch synchronization, and executing the merge via the CrewChief CLI before cleaning up the VS Code workspace folder.

Do I need CrewChief CLI to merge a git worktree?

Yes, the CrewChief CLI is required to execute the git worktree merge. The workspace-folder.sh script is also a necessary dependency to handle the VS Code workspace folder removal during cleanup.

Does the git worktree merge script support devcontainer environments?

Yes, the git worktree merge script supports devcontainer environments by applying container-mode execution to ensure the workspace cleanup and merge operations function correctly within VS Code devcontainer setups.

What is the best way to clean up VS Code workspace folders after a git worktree merge?

The best way to clean up VS Code workspace folders after a git worktree merge is to automate the removal using the workspace-folder.sh script, which tidies up the project environment by deleting the worktree entry.