vc:merge-worktree

Merge a git worktree branch into the main checkout and prune it.

Updated May 10, 2026
One-click install
npx skills add https://github.com/cryborg1211/quant_trading_telegram_bot --skill vc-merge-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vc:merge-worktree
Source: https://github.com/cryborg1211/quant_trading_telegram_bot/tree/main/.agents/skills/vc-merge-worktree
Command: npx skills add https://github.com/cryborg1211/quant_trading_telegram_bot --skill vc-merge-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Merges a git worktree branch back into the main checkout and cleans up the worktree, reducing clutter and keeping the repository in a consistent state.

Core Features & Use Cases

  • Safe verification that the current path is a worktree and not the main checkout.
  • Merge the worktree branch into the main branch and prune the worktree if the merge is successful.
  • Cleanup the local branch and prune residual references, with clear recovery steps in case of conflicts.
  • Use case: you created a feature-specific worktree to work on a bug fix, and after completion you want to integrate changes and remove the temporary worktree.

Quick Start

Switch to the main checkout, merge the worktree branch back into main, and remove the worktree if the merge succeeds.

Frequently Asked Questions about vc:merge-worktree

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

FAQPage Schema
How do I merge a git worktree branch back into main and clean it up?

To merge a git worktree, switch to the main checkout, merge the worktree branch into main, and prune the worktree if the merge succeeds. It cleans up the temporary worktree and local branch.

What happens if I have uncommitted changes when merging a git worktree?

When merging a git worktree, the process halts on uncommitted changes to prevent data loss. It provides clear recovery steps using git status to resolve pending modifications before proceeding.

Can I run a git worktree merge directly from the main checkout?

No, merging a git worktree enforces safety checks preventing operations on main. It verifies the current path is a worktree and not the main checkout before proceeding with branch integration.

How do I resolve conflicts when merging a git worktree branch?

If a git worktree merge encounters conflicts, the process halts and provides clear recovery steps using git status, git worktree list, and prune commands to manage residual references and restore consistency.

Why do I need to prune a git worktree after merging branches?

Pruning a git worktree after a successful merge removes the temporary worktree and cleans up residual references. This reduces repository clutter and ensures the local branch is safely removed.