跳到正文
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(原文)

安装前可以查看交给 AI 代理的指令内容。

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.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Check whether this card's code meets the acceptance criteria

中文简介正在准备中。当前显示原文说明。

beyondessential/tamanu92026年10月20日 更新

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月20日 更新

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

中文简介正在准备中。当前显示原文说明。

beyondessential/tamanu92026年10月20日 更新

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

中文简介正在准备中。当前显示原文说明。

beyondessential/tamanu92026年10月20日 更新

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

中文简介正在准备中。当前显示原文说明。

beyondessential/tamanu92026年10月20日 更新

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月20日 更新

查看 beyondessential 的全部技能

报告此技能的问题