merge

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

4|Updated Sep 30, 2024
One-click install
npx skills add https://github.com/okm321/dotfiles --skill merge-okm321
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: merge
Source: https://github.com/okm321/dotfiles/tree/main/claude/skills/merge
Command: npx skills add https://github.com/okm321/dotfiles --skill merge-okm321

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Finishing work on a feature branch involves several repetitive git steps—committing staged changes, rebasing onto the base branch, resolving conflicts, and merging—which are easy to perform inconsistently or in the wrong order. ## Core Features & Use Cases - Automated Commit: Commits any staged changes using lowercase, imperative-mood messages without conventional commit prefixes. - Local Rebase with Conflict Guidance: Rebases onto the locally configured base branch (never fetching from origin) and provides a structured process for understanding and resolving conflicts while preserving both sides' changes. - Workmux Merge & Cleanup: 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 merge command to commit, rebase onto main, and merge in one consistent workflow. ## Quick Start Run the merge command to commit my staged changes, rebase onto the base branch, and merge with workmux.

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 command, which commits any staged changes, rebases onto the configured base branch, and runs workmux merge to merge and clean up. Flags like --keep and --no-verify can be passed as arguments.

How do I rebase onto the base branch without fetching from origin?▼

The skill reads the base branch from git config key branch.<current>.workmux-base, defaulting to main, then runs git rebase on the local branch name only. It never runs git fetch or rebases onto origin/<branch>.

How are rebase conflicts resolved during a merge?▼

Before resolving, the skill inspects each conflicting file with git log -p -n 3 <base-branch> -- <file> to understand base branch changes. It then resolves to preserve both sides, stages the file, and continues with git rebase --continue, asking for guidance on unclear conflicts.

What does the --keep flag do when merging with workmux?▼

The --keep flag (or -k) is passed through to workmux merge, which keeps the worktree and tmux window after merging instead of cleaning them up. The --no-verify flag (-n) similarly passes --no-verify to workmux merge.

What happens if no base branch is configured for the current branch?▼

If git config returns no workmux-base value for the current branch, the skill defaults to rebasing onto main. The rebase still targets the local branch only, never a remote-tracking branch.