merge

Commit staged changes, rebase onto the base branch, and merge with workmux.

2|Updated Oct 16, 2021
One-click install
npx skills add https://github.com/pattobrien/dotfiles --skill merge-pattobrien
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: merge
Source: https://github.com/pattobrien/dotfiles/tree/main/claude/skills/merge
Command: npx skills add https://github.com/pattobrien/dotfiles --skill merge-pattobrien

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Finishing work on a feature branch requires several manual git steps—committing staged changes, rebasing onto the base branch, resolving conflicts, and merging—which are repetitive and error-prone when done by hand. ## Core Features & Use Cases - Automated Commit: Commits any staged changes using lowercase, imperative-mood messages without conventional commit prefixes. - Guided Rebase: Rebases onto the local base branch (read from git config workmux-base, defaulting to main) with explicit conflict-resolution guidance that preserves changes from both branches. - Workmux Merge: Runs workmux merge --rebase --notification to merge the branch and clean up the worktree and tmux window, with optional --keep and --no-verify flags. - Use Case: After finishing a feature in a workmux-managed worktree, invoke the skill to commit, rebase onto main, and merge in one flow without manually juggling git commands. ## Quick Start Ask the assistant to run the merge skill to commit, rebase, and merge the current branch, optionally passing --keep to retain the worktree.

Frequently Asked Questions about merge

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

FAQPage Schema
How do I commit, rebase, and merge a git branch in one step?▼

Invoke the merge skill, which commits staged changes, rebases onto the configured base branch, and runs workmux merge to finalize. Flags like --keep and --no-verify can be passed as arguments to adjust behavior.

How does the skill determine which base branch to rebase onto?▼

It reads the git config key branch.<current-branch>.workmux-base to find the base branch. If no base is configured, it defaults to main and rebases onto the local branch only.

Does the merge skill fetch from origin before rebasing?▼

No, the skill explicitly never runs git fetch and never rebases onto origin/<branch>. It rebases only onto the local base branch, such as git rebase main.

What happens when rebase conflicts occur during the merge?▼

The skill inspects recent base-branch changes to each conflicting file with git log -p -n 3 before resolving. It preserves changes from both branches, stages resolved files, continues the rebase, and asks for guidance if a conflict is too complex.

Can I keep the worktree and tmux window after merging?▼

Yes, pass the --keep or -k flag as an argument. The skill forwards --keep to workmux merge so the worktree and tmux window are retained instead of cleaned up.