feat(skills): 新增 gitlink-fork-sync Fork 与上游同步助手 Skill #421
Loading…
Reference in New Issue
No description provided.
Delete Branch "Taoyouce/gitlink-cli:feat/skill-fork-sync"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
现有 42 个 Skill 无一覆盖「Fork 与上游同步」——而这是所有基于 fork 工作流的贡献者(含本次大赛全部参赛者)的高频刚需:贡献前对齐上游、检测 fork 落后、提 PR 前 rebase 分支。
内容
新增
skills/gitlink-fork-sync/SKILL.md:branch +list取commit_id比对 + 本地git merge-base --is-ancestor判祖先关系,确定性三态判定(一致/落后/分叉),无需跨仓库 compare生产验证(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 路径。Pull request closed