empower-sync
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEmpower Sync
Empower 同步操作
Use this skill to cherry-pick a single commit from the remote into for the empower-site project.
geminisync-upstream使用此技能将远程仓库中的单个commit cherry-pick到empower-site项目的分支。
geminisync-upstreamInputs
输入项
- 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
工作流程
-
Preflight
git status --porcelain- If not clean, stop and ask to commit or stash.
-
Fetch remote
git fetch gemini
-
Prepare sync-upstream
- Confirm before resetting to the default branch.
sync-upstream git checkout <default-branch>git pull origin <default-branch>git branch -f sync-upstream <default-branch>git checkout sync-upstream
- Confirm before resetting
-
Dry-run review
git show <sha> --statgit show <sha> -p- Summarize files and risks.
- Ask for approval to apply.
-
Apply
git cherry-pick <sha>
-
Conflict handling
- If conflicts, list them and ask how to resolve.
- Use after resolution.
git cherry-pick --continue
-
Report
- Show recent log and .
git status - Confirm the branch is ready for review/testing.
- Show recent log and
-
预检查
- 执行命令
git status --porcelain - 如果工作区不干净,停止操作并询问用户是提交修改还是暂存修改。
- 执行
-
拉取远程仓库内容
- 执行命令
git fetch gemini
- 执行
-
准备sync-upstream分支
- 在将分支重置为默认分支前,需获得用户确认。
sync-upstream - 执行命令
git checkout <default-branch> - 执行命令
git pull origin <default-branch> - 执行命令
git branch -f sync-upstream <default-branch> - 执行命令
git checkout sync-upstream
- 在将
-
预演审查
- 执行命令
git show <sha> --stat - 执行命令
git show <sha> -p - 总结涉及的文件和潜在风险。
- 请求用户批准以执行后续操作。
- 执行
-
执行操作
- 执行命令
git cherry-pick <sha>
- 执行
-
冲突处理
- 如果出现冲突,列出冲突内容并询问用户如何解决。
- 解决冲突后,执行命令
git cherry-pick --continue
-
结果汇报
- 展示最近的提交日志和状态。
git status - 确认分支已准备好进行审查或测试。
- 展示最近的提交日志和