本文へ移動
cccskills
無料GitHub で公開

rebase-post-merge

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

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Check whether this card's code meets the acceptance criteria

日本語の概要は準備中です。原文の説明を表示しています。

beyondessential/tamanu92026年10月13日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

beyondessential/tamanu92026年10月13日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

beyondessential/tamanu92026年10月13日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

beyondessential/tamanu92026年10月13日 更新

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

日本語の概要は準備中です。原文の説明を表示しています。

beyondessential/tamanu92026年10月13日 更新

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.

日本語の概要は準備中です。原文の説明を表示しています。

beyondessential/tamanu92026年10月13日 更新

beyondessential のスキルをすべて見る

このスキルの問題を報告する