/devx-git:update-origin [origin-branch]from devx-git
Merges an origin branch (default main) into the current branch with a recoverable backup, safe conflict resolution, and no force-push. Use to update, sync, or merge branches.
Ships in devx-git. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Merge origin/<origin-branch> (= $ARGUMENTS, default main) into the current branch, always behind a recoverable backup.
Copy this checklist into your reply and check items off as you go:
Update Progress:
- [ ] Preflight passed (clean tree, not detached, branch ≠ target, push.default safe)
- [ ] Backup branch created
- [ ] Synced with origin/<current-branch> (if it has new commits)
- [ ] Merged origin/<target>
- [ ] Conflicts resolved
- [ ] Result verified clean
- [ ] Pushed (only if user confirmed)
- [ ] Backup deleted (success) or kept (recovery)
git status --porcelain; any output → stop and tell the user to commit or stash first. Do nothing else.<origin-branch>.git branch backup/$(git branch --show-current)-$(git rev-parse --short HEAD). Tell the user the exact name; call it <backup> below.<backup> unless the final tree is verified clean and the update succeeded.--force, --force-with-lease, +refspec — all forbidden). Several developers and agents work on the same branch; rewriting published history clobbers their work. A rejected push means new remote commits to merge in, never to overwrite.git push obeys push.default, and under matching it pushes every same-named local branch. Always git push origin HEAD. Preflight hardening: run git config push.default; if matching or empty, warn the user and offer git config push.default current for this repo.git fetch origin.origin/<current-branch> exists and has commits not on HEAD (git rev-list --count HEAD..origin/<current-branch> > 0), others pushed while you worked → git merge origin/<current-branch> first.git merge origin/<origin-branch>.Any conflict → Phase 2. Both merges clean → Phase 3.
Per conflict, default to keeping both sides — reconcile the origin and local changes so neither intent is lost. Then git add the resolved files and git commit --no-edit; repeat if the next merge also conflicts.
Reconcile silently (do NOT ask) for ordinary, combinable conflicts:
Ask the user only when the sides genuinely contradict and "keep both" is wrong:
Present the specific conflict and concrete options. If resolution becomes unworkable, git merge --abort leaves the branch untouched — report and stop.
git status clean, git log --oneline -5 shows the merge. If it is not clean, do not proceed — go to recovery (step 4).git push origin HEAD. If rejected because the remote moved again → git fetch origin, git merge origin/<current-branch>, resolve per Phase 2, push again.git branch -D <backup>.<backup> and give recovery steps:
git merge --abort 2>/dev/null
git reset --hard <backup>
Already pushed → the merge is published; do not reset — fix forward with a new commit or git revert.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
git-merge, branch-update, conflict-resolution, backup-branch
npx claudepluginhub agentic-dev3o/devx-plugins --plugin devx-git3 skills in this plugin
/ciStages the changes produced in this session, excludes junk and secrets, and generates a conventional commit. Triggered when the user runs /devx-git:ci or asks to commit./prCreates a GitHub pull request using gh CLI. Triggered when the user asks to open, create, or submit a PR, or runs /pr.Other plugins' skills for the same job