feat(skills): 新增 gitlink-fork-sync Fork 与上游同步助手 Skill #421

Closed
Taoyouce wants to merge 0 commits from Taoyouce/gitlink-cli:feat/skill-fork-sync into master
Contributor

背景

现有 42 个 Skill 无一覆盖「Fork 与上游同步」——而这是所有基于 fork 工作流的贡献者(含本次大赛全部参赛者)的高频刚需:贡献前对齐上游、检测 fork 落后、提 PR 前 rebase 分支。

内容

新增 skills/gitlink-fork-sync/SKILL.md

  • 落后检测:两侧 branch +listcommit_id 比对 + 本地 git merge-base --is-ancestor 判祖先关系,确定性三态判定(一致/落后/分叉),无需跨仓库 compare
  • 同步方案:按分支状态给出 fast-forward / rebase / 保留分叉的命令与风险标注;写操作(push)前必须向用户展示计划并确认,受保护分支跳过,禁止未确认 force push
  • 执行复核:同步后重新比对 HEAD 验证生效
  • 遵循 skills 仓库全部惯例:frontmatter、三条 CRITICAL 声明、gitlink-shared 前置引用;已登记 skills/README.md 索引

生产验证(2026-07-10)

真实 fork 对(Gitlink/gitlink-cli ⇆ Taoyouce/gitlink-cli)实测检测流水线:API 取得两侧 master 完整 SHA(9749a4c… vs 604303e…)→ merge-base 判定「fork 领先(含独立提交)」,正确落入需询问用户的分叉分支保护逻辑。

平台语义坑(已写入注意事项)

跨 fork compare 端点(from=master&to=<fork>:master)实测返回「获取对比信息失败」,故本 Skill 明确要求走 branch +list + merge-base 路径。

## 背景 现有 42 个 Skill 无一覆盖「Fork 与上游同步」——而这是所有基于 fork 工作流的贡献者(含本次大赛全部参赛者)的高频刚需:贡献前对齐上游、检测 fork 落后、提 PR 前 rebase 分支。 ## 内容 新增 `skills/gitlink-fork-sync/SKILL.md`: - **落后检测**:两侧 `branch +list` 取 `commit_id` 比对 + 本地 `git merge-base --is-ancestor` 判祖先关系,确定性三态判定(一致/落后/分叉),无需跨仓库 compare - **同步方案**:按分支状态给出 fast-forward / rebase / 保留分叉的命令与风险标注;写操作(push)前必须向用户展示计划并确认,受保护分支跳过,禁止未确认 force push - **执行复核**:同步后重新比对 HEAD 验证生效 - 遵循 skills 仓库全部惯例:frontmatter、三条 CRITICAL 声明、gitlink-shared 前置引用;已登记 skills/README.md 索引 ## 生产验证(2026-07-10) 真实 fork 对(Gitlink/gitlink-cli ⇆ Taoyouce/gitlink-cli)实测检测流水线:API 取得两侧 master 完整 SHA(9749a4c… vs 604303e…)→ merge-base 判定「fork 领先(含独立提交)」,正确落入需询问用户的分叉分支保护逻辑。 ## 平台语义坑(已写入注意事项) 跨 fork compare 端点(`from=master&to=<fork>:master`)实测返回「获取对比信息失败」,故本 Skill 明确要求走 branch +list + merge-base 路径。
Taoyouce added 6 commits 2026-07-11 01:04:17 +08:00
wbtiger closed this pull request 2026-07-14 22:03:42 +08:00
wbtiger reopened this pull request 2026-07-14 23:03:29 +08:00
wbtiger closed this pull request 2026-07-14 23:08:58 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Gitlink/gitlink-cli#421
No description provided.