Skip to content
cccskills
FreePublished on GitHub

rebase-post-merge

Rebase the branch past a merge so a follow-up PR carries only new work

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.9 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Your task: rebase past the merge

This card's previous PR was merged, and a follow-up PR is now open on the same branch. The branch still carries the commits that PR merged, so the follow-up's diff replays work that has already landed. Your job is to drop those commits and leave only the work done since.

Workhorse tried this automatically and hit conflicts, which is why you have it.

The user message names the base branch and the merged PR's number.

  1. git fetch origin to refresh remote refs
  2. Get the merged PR's head commit: gh pr view <number> --json headRefOid -q .headRefOid. That commit is the last one the merge covered, so everything up to and including it is already on the base branch
  3. git rebase --onto origin/<base-branch> <that-sha> — this drops the merged commits by range rather than replaying them, which is what keeps the rebase clean. Do NOT use a plain git rebase origin/<base-branch>: it replays the already-merged commits and conflicts against the squashed form of the branch's own work
  4. Resolve any conflicts as they come. These are against genuine upstream changes, so use the card's specs, description, and conversation history to decide which side to favour. git add the resolved files and git rebase --continue
  5. Force-push with git push --force-with-lease origin <branch>
  6. Check for soft conflicts — the branch now sits on newer upstream code, so inspect the diff against local specs and code for assumptions the upstream changes invalidated. Use your judgement about what matters
  7. Report what the branch now contains, any conflicts you resolved and how, and any soft conflicts you found

If the rebase turns out to be unsalvageable, git rebase --abort and explain what blocked it rather than leaving the branch mid-rebase.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Check whether this card's code meets the acceptance criteria

The English summary is being prepared. Showing the original description.

beyondessential/tamanu9Updated Oct 20, 2026

Summarise the unit and e2e tests a branch/PR adds, run only those, and produce a paste-ready report (e.g. for a Linear card). Use when asked to 'summarise added tests', 'run the new tests', 'what tests did this PR add', or to prove a card's test coverage.

The English summary is being prepared. Showing the original description.

beyondessential/tamanu9Updated Oct 20, 2026

Run a quick UX/UI workshop using ASCII-art sketches

The English summary is being prepared. Showing the original description.

beyondessential/tamanu9Updated Oct 20, 2026

Write automated tests for unticked scenarios in this card's test cases

The English summary is being prepared. Showing the original description.

beyondessential/tamanu9Updated Oct 20, 2026

Review code changes on this card for likely bugs, regressions, and missed edges

The English summary is being prepared. Showing the original description.

beyondessential/tamanu9Updated Oct 20, 2026

Maintain a support docs pack — dedup, length budgets, and no splintering — and land changes as a reviewed pull request. Use when a support thread, or a hand-off from Support assist, surfaces a new resolution, a correction to an existing one, or a deployment quirk worth recording. Not for ordinary code changes.

The English summary is being prepared. Showing the original description.

beyondessential/tamanu9Updated Oct 20, 2026

See all skills by beyondessential

Report a problem with this skill