git:merge-worktree

Merge selected files, hunks, or commits from git worktrees into the current branch.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/luicabref97/sushi-jungle-web --skill git-merge-worktree-luicabref97
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git:merge-worktree
Source: https://github.com/luicabref97/sushi-jungle-web/tree/main/.agents/skills/git-merge-worktree
Command: npx skills add https://github.com/luicabref97/sushi-jungle-web --skill git-merge-worktree-luicabref97

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Help developers selectively bring changes from other git worktrees or branches into the current branch without performing full merges or losing control over which files, hunks, or commits are applied, reducing merge noise and conflicts.

Core Features & Use Cases

  • Selective file checkout: Pull whole files or directories from another branch or worktree into the current branch.
  • Interactive patch selection: Choose specific hunks within files using patch-mode style prompts to apply only desired changes.
  • Cherry-pick with selective staging: Apply commits without committing and exclude unwanted files before finalizing.
  • Manual no-commit merges and conflict resolution: Perform controlled merges with the option to resolve conflicts and stage selectively.
  • Multi-worktree composition and cleanup: Combine files from multiple worktrees and optionally remove stale worktrees after merging.
  • Use case: Integrating a small bugfix from a feature worktree into main without merging the entire feature branch.

Quick Start

Invoke the merge-worktree skill to import src/module.js from the worktree ../project-feature into your current branch using interactive patch selection.

Frequently Asked Questions about git:merge-worktree

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

FAQPage Schema
How do I merge specific files from a git worktree into my current branch?

To merge specific files from a git worktree, you can use a selective file checkout to pull whole files or directories from another worktree into your current branch without performing a full branch merge.

Can I interactively select specific hunks from another worktree during a git merge?

Yes, interactive patch selection allows you to choose specific hunks within files using patch-mode style prompts, ensuring you apply only desired changes from a worktree instead of entire files.

What is the best way to cherry-pick commits across worktrees without committing unwanted files?

The best way is using cherry-pick with selective staging, which applies commits from a worktree without committing and allows you to exclude unwanted files before finalizing the merge.

Does merging changes from a git worktree require a clean working directory?

Yes, merging worktree changes requires a clean working directory or explicit stashing beforehand to prevent conflicts and ensure controlled, no-commit merges.

How do I combine changes from multiple git worktrees and clean up stale ones?

Multi-worktree composition lets you combine files from multiple worktrees into your current branch, with options to remove stale worktrees after merging to keep your repository organized.