一键导入
git-push-secondary-merge-primary-cn
当用户需要提交并推送工作分支,再合并到主分支并推送双分支结果时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
当用户需要提交并推送工作分支,再合并到主分支并推送双分支结果时使用。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | git-push-secondary-merge-primary-cn |
| description | 当用户需要提交并推送工作分支,再合并到主分支并推送双分支结果时使用。 |
执行标准的双分支交接流程:在副分支完成工作并推送,再合并到主分支并推送,最后切回副分支。
dev、develop 或其他集成分支。main 或 master。这个流程适合需要同时推送副分支和主分支的发布同步场景,并尽量保留主分支上清晰的合并结果。
当用户要求执行以下操作时使用本技能:
dev → main 或 develop → master以下场景不要使用本技能:
git-weekly-report-cn)code-reviewer 或 frontend-code-review)先按分支识别规则确定主分支和副分支,再按工作流程顺序执行。遇到分支名不明确、合并冲突、脏工作区或推送被拒绝且无法安全处理时,停止并说明阻塞原因,不要猜测执行。
dev 或 main,但仓库实际使用 develop 或 master 时,先核对真实分支再选择。git symbolic-ref refs/remotes/origin/HEAD 识别主分支。main,其次 master。dev,其次 develop。检查仓库状态。
git status --short、git branch --show-current、git remote -v。<secondary_branch> 和 <primary_branch>。将工作切换到 <secondary_branch>。
<secondary_branch> 上则继续。git checkout <secondary_branch> 与 git pull --ff-only origin <secondary_branch>。如果 <secondary_branch> 上有本地改动,先提交。
git add 暂存相关变更,除非用户要求更小的范围。type(scope): 前缀 + 冒号后接中文摘要。--no-verify。<secondary_branch> 无本地改动,跳过提交直接进入推送步骤。推送 <secondary_branch>。
git push origin <secondary_branch>。git fetch 并查看再重试;除非用户明确要求,否则不执行强制推送。合并到 <primary_branch>。
git checkout <primary_branch>。git pull --ff-only origin <primary_branch>。<primary_branch> 未包含 <secondary_branch> 时,使用 git merge --no-ff <secondary_branch> -m "chore(<primary_branch>): 合并 <secondary_branch> 到 <primary_branch>" 保留合并提交。推送 <primary_branch>。
git push origin <primary_branch>。切回 <secondary_branch>。
git checkout <secondary_branch>。git status --short 和 git branch --show-current 复核。<secondary_branch>。保持最终回复简洁。包含成功推送的分支与提交哈希。若宿主应用支持 Git 指令,仅在对应 Git 动作成功后再发出相关指令。
Use when creating one local Git commit without pushing. Supports diff-based Conventional Commit type/scope/message generation, staged or requested change handling, segmented commit bodies for non-trivial changes, and safe commit-only workflows. Trigger for requests such as "commit this", "create a commit", "commit current changes without pushing", or local-only handoff.
Use when committing and pushing current changes on one branch with a Conventional Commit message. Supports diff-based type/scope/message generation, staged or requested change handling, segmented commit bodies for non-trivial changes, and safe single-branch push handling.
当用户只需要创建一个本地 Git 提交且不推送时使用。支持基于 diff 自动判断 Conventional Commit 的 type/scope/summary、处理已暂存或用户要求的改动范围、为非简单改动生成分段提交正文,并执行安全的仅提交工作流。适用于“提交当前改动”“只 commit 不 push”“创建一个本地提交”等请求。
当用户需要在当前单分支提交并推送改动,并生成 Conventional Commit 信息时使用。支持基于 diff 自动判断 type/scope/summary、处理已暂存或用户要求的改动范围、为非简单改动生成分段提交正文,并安全处理单分支推送。
Use when creating, critiquing, or iterating logo and brand-mark concepts through a designer-distillation board, including brand intake, public-source designer lenses, concept territories, visual prompts, and logo quality scoring.
当用户需要用设计师人格蒸馏、品牌策略、概念方向、视觉提示词和质量评分来设计、评审或迭代 Logo 与品牌标识时使用。