merge

Merges a topic branch into the base branch across git worktrees with conflict resolution.

10|1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill merge-kevinhuangislearning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge
Source: https://github.com/KevinHuangIsLearning/shortestpath-ide/tree/main/src/vs/sessions/skills/merge
Command: npx skills add https://github.com/KevinHuangIsLearning/shortestpath-ide --skill merge-kevinhuangislearning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It automates the process of merging work done on a session's topic branch back into the base branch, including committing leftover changes and resolving merge conflicts safely. ## Core Features & Use Cases - Pre-merge commit handling: Detects uncommitted changes in the current worktree and commits them before merging. - Cross-worktree merge: Runs git commands against the main worktree using git -C without leaving the current worktree. - Guided conflict resolution: Lists conflicted files, resolves conflicts while preserving both sides' intent, and asks the user when uncertain. - Post-merge validation: Verifies the worktree is clean and confirms the topic branch is an ancestor of the base branch. - Use Case: After finishing a feature in an isolated session worktree, ask the assistant to merge the topic branch back into the main branch, resolving any conflicts along the way. ## Quick Start Ask the assistant to merge the current session's topic branch back into the base branch in the main worktree.

Frequently Asked Questions about merge

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

FAQPage Schema
How do I merge a topic branch into the base branch in git?

Run git merge <topic-branch> from the worktree containing the base branch. This skill automates that by running git -C <main-worktree-path> merge <topic-branch>, so the merge happens in the main worktree without switching directories.

How do I resolve git merge conflicts from the command line?

List conflicted files with git diff --name-only --diff-filter=U, edit each file to preserve the intent of both sides, then stage them with git add. Once all conflicts are staged, finish with git commit --no-edit.

Can I run git commands on another worktree without switching directories?

Yes, use git -C <path> followed by the command to operate on a repository at a different path. This lets you merge, check status, or stage files in the main worktree while staying in your current worktree.

How do I verify a git merge completed successfully?

Check that the worktree is clean with git status --porcelain, then confirm all commits merged with git merge-base --is-ancestor <topic-branch> HEAD. An empty status and a zero exit code confirm success.

What happens to uncommitted changes before a git merge?

Uncommitted changes in the current worktree are detected with git status --porcelain and committed first using the commit skill. This prevents the merge from failing or losing in-progress work.