git-worktree-merge

Merge worktree branches into main with diff review and overlap detection.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/ManfronEnrico/thesis-manifold --skill git-worktree-merge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-merge
Source: https://github.com/ManfronEnrico/thesis-manifold/tree/main/.claude/skills/git-worktree-merge
Command: npx skills add https://github.com/ManfronEnrico/thesis-manifold --skill git-worktree-merge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the end-to-end process of merging a worktree branch back into main, ensuring changes are reviewed, overlaps are detected, PR workflows are guided, and cleanup is performed.

Core Features & Use Cases

  • Diff review and summary between main and the worktree
  • Overlap detection against other open PRs
  • GitHub PR guidance or local merge options
  • Post-merge cleanup and worktree removal guidance
  • Use Case: finish feature work in a worktree and prepare a safe merge into main.

Quick Start

Complete the end-of-worktree merge by reviewing diffs, detecting overlaps, creating or updating a PR if needed, and cleaning up the worktree.

Frequently Asked Questions about git-worktree-merge

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

FAQPage Schema
How do I merge a git worktree branch back to main?

To merge a git worktree branch back to main, review diffs, detect overlaps with other open PRs, validate with a dry-run merge, and perform post-merge worktree cleanup. This ensures safe integration via GitHub PR or local merge.

What is git worktree overlap detection and when do I need it?

Git worktree overlap detection identifies conflicting changes between your current worktree branch and other open PRs before merging. You need it to prevent merge conflicts and ensure your feature work integrates safely into main without overwriting parallel changes.

Can I do a dry-run merge validation before merging a worktree to main?

Yes, you can perform dry-run merge validation before merging a worktree to main. This checks for potential conflicts and verifies health gates pass, ensuring the merge will succeed before you commit to the actual integration via PR or local merge.

What's the best way to review diffs between a worktree and main?

The best way to review diffs between a worktree and main is to generate a diff summary that highlights all changes. This allows you to verify the feature work before proceeding with overlap detection, PR creation, and the final merge into main.

Do I need to clean up the worktree after merging to main?

Yes, you need to clean up the worktree after merging to main. Post-merge cleanup involves removing the worktree directory and associated branch references, keeping your repository organized after the feature work has been successfully integrated.

Does this merge workflow support both GitHub PRs and local merges?

Yes, this worktree merge workflow supports both GitHub PR guidance and local merge options. It guides you through creating or updating a PR if needed, or performing a direct local merge, with overlap checks and automated guidance for either path.