Merge Command banner
peterkrueck peterkrueck

Merge Command

Git community intermediate

Description

Finalize worktree work: update docs, commit, merge to main, clean up. **Context from user:** $ARGUMENTS ---

Installation

Terminal
claude install-skill https://github.com/peterkrueck/Claude-Code-Development-Kit

README

Merge Command

Finalize worktree work: update docs, commit, merge to main, clean up.

**Context from user:** $ARGUMENTS


Pre-flight

    undefined

Step 1: Update Documentation

Invoke the `/update-docs` skill, passing the branch changes as context. If no doc updates are needed, it will skip — that's fine.

Step 2: Commit Uncommitted Changes

Run `git status`. If there are uncommitted changes:

    undefined

If the working tree is clean, skip to Step 3.

Step 3: Merge to Main

**Critical: You cannot `git checkout main` inside a worktree** — main is checked out in the main repo. Use `git -C ` for all merge operations.

    undefined

Step 4: Clean Up Worktree

Only after a **successful** merge:

Use the `ExitWorktree` tool with:

    undefined

This is safe because all work is now on main. The tool warns about "unmerged commits" because it checks the worktree branch, not main — but the commits ARE on main after Step 3.

Step 5: Confirm

Report to user: what was merged (commit count + summary), and that we're back on main.