empower-sync

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Empower Sync

Empower 同步操作

Use this skill to cherry-pick a single commit from the
gemini
remote into
sync-upstream
for the empower-site project.
使用此技能将
gemini
远程仓库中的单个commit cherry-pick到empower-site项目的
sync-upstream
分支。

Inputs

输入项

  • Require a commit SHA. If missing, ask for it.
  • Remote is
    gemini
    .
  • 需要提供commit SHA。如果未提供,请用户补充。
  • 远程仓库为
    gemini

Safety Rules

安全规则

  • Stop if the working tree is dirty.
  • Ask before resetting or recreating
    sync-upstream
    .
  • Do not cherry-pick until the user approves after reviewing the diff.
  • 如果工作区未干净(存在未提交修改),则停止操作。
  • 在重置或重新创建
    sync-upstream
    分支前,需询问用户确认。
  • 需在用户查看差异并批准后,再执行cherry-pick操作。

Workflow

工作流程

  1. Preflight
    • git status --porcelain
    • If not clean, stop and ask to commit or stash.
  2. Fetch remote
    • git fetch gemini
  3. Prepare sync-upstream
    • Confirm before resetting
      sync-upstream
      to the default branch.
    • git checkout <default-branch>
    • git pull origin <default-branch>
    • git branch -f sync-upstream <default-branch>
    • git checkout sync-upstream
  4. Dry-run review
    • git show <sha> --stat
    • git show <sha> -p
    • Summarize files and risks.
    • Ask for approval to apply.
  5. Apply
    • git cherry-pick <sha>
  6. Conflict handling
    • If conflicts, list them and ask how to resolve.
    • Use
      git cherry-pick --continue
      after resolution.
  7. Report
    • Show recent log and
      git status
      .
    • Confirm the branch is ready for review/testing.
  1. 预检查
    • 执行
      git status --porcelain
      命令
    • 如果工作区不干净,停止操作并询问用户是提交修改还是暂存修改。
  2. 拉取远程仓库内容
    • 执行
      git fetch gemini
      命令
  3. 准备sync-upstream分支
    • 在将
      sync-upstream
      分支重置为默认分支前,需获得用户确认。
    • 执行
      git checkout <default-branch>
      命令
    • 执行
      git pull origin <default-branch>
      命令
    • 执行
      git branch -f sync-upstream <default-branch>
      命令
    • 执行
      git checkout sync-upstream
      命令
  4. 预演审查
    • 执行
      git show <sha> --stat
      命令
    • 执行
      git show <sha> -p
      命令
    • 总结涉及的文件和潜在风险。
    • 请求用户批准以执行后续操作。
  5. 执行操作
    • 执行
      git cherry-pick <sha>
      命令
  6. 冲突处理
    • 如果出现冲突,列出冲突内容并询问用户如何解决。
    • 解决冲突后,执行
      git cherry-pick --continue
      命令
  7. 结果汇报
    • 展示最近的提交日志和
      git status
      状态。
    • 确认分支已准备好进行审查或测试。