Skip to content

Commit a3dd5c3

Browse files
committed
docs(sync-worktree): 更新技能文档版本并添加合并确认交互
更新技能文档版本号至1.2,新增在rebase成功后询问用户是否将分支合并回基准分支的交互流程说明。此交互允许用户选择继续合并流程或仅完成rebase操作,优化了工作流灵活性。
1 parent 190c7ee commit a3dd5c3

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.claude/skills/sync-worktree/SKILL.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: 在多个 git worktree 分支之间同步代码(rebase / merge)
44
license: MIT
55
metadata:
66
author: mudssky
7-
version: "1.1"
7+
version: "1.2"
88
---
99

1010
在多个 git worktree 分支之间通过 rebase 同步代码,或将 feature 分支 merge 回主分支。
@@ -267,6 +267,21 @@ git -C <worktree-path> rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2
267267
如果该分支有远程跟踪分支,提醒:
268268
> ⚠ 该分支有远程跟踪分支,rebase 后需要 `git push --force-with-lease` 来更新远程。
269269
270+
### 5.1 询问是否合并回基准分支
271+
272+
展示成功报告后,使用 **AskUserQuestion** 询问用户是否要将该分支合并回基准分支:
273+
274+
| 选项 | 说明 |
275+
|------|------|
276+
| 合并回 `<base>` | 继续将 `<branch>` merge 到基准分支(跳转 Step 7.5) |
277+
| 不合并 | 仅完成 rebase,到此结束 |
278+
279+
如果用户选择「合并回 `<base>`」,跳转 Step 7.5(合并预览),继续执行合并流程。此时无需重复 Step 7.1–7.4(验证、工作区检查、更新基准、同步检查),因为刚刚已经完成了这些步骤。
280+
281+
如果用户选择「不合并」,**到此结束。**
282+
283+
**注意**:当 Step 5 是从 Step 7(合并回主分支 → 先同步再合并)调用时,跳过此交互,直接继续 Step 7.5 的合并流程。
284+
270285
---
271286

272287
## Step 6: 批量同步(`--all`

0 commit comments

Comments
 (0)