What problem does it solve?
Keeps a feature or working branch up to date by merging changes from a target branch (such as main or dev) while preventing surprises from uncommitted work, missing tracking branches, or upstream divergence.
Core Features & Use Cases
- Target branch detection: Uses an explicitly provided branch argument, or falls back to a
mp-base-branch-detector sub-agent to infer likely remote base branches.
- Pre-merge safety checks: Detects uncommitted changes and prompts to stash; checks whether the current branch is behind, ahead, diverged, or in sync with its remote tracking branch.
- Merge with conflict handling: Fetches and previews incoming commits, performs the merge, and guides resolution for conflicts using analysis of conflict markers and iterative resolution.
Quick Start
Run mp-sync-base to merge the target branch (for example, main) into your current branch while it checks status, sync state, and resolves conflicts if needed.