协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
git-push-secondary-merge-primary【开发与工程】Use when committing and pushing a work branch, then merging it into the primary branch and pushing both branches.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Execute the standard two-branch handoff: finish work on the secondary branch, push it, merge it into the primary branch, push the primary branch, then return to the secondary branch.
Use "secondary branch" for the branch that contains the current work, such as dev, develop, or another integration branch. Use "primary branch" for the protected/release branch, such as main or master.
This workflow is for safe release-sync handoffs where both branches need to be pushed and the primary branch should preserve a clear merge result.
Use this skill when the user asks for:
dev → main or develop → masterDo not use this skill for:
git-weekly-report instead)code-reviewer or frontend-code-review instead)Follow the branch detection rules first, then execute the workflow in order. Stop and report the blocker instead of guessing when branch names, merge conflicts, dirty worktrees, or rejected pushes cannot be handled safely.
dev or main but the repository uses develop or master, inspect actual branches before choosing.git symbolic-ref refs/remotes/origin/HEAD when available.main, then master.dev, then develop.Follow the workflow below exactly, preserving user changes and stopping on unsafe branch, merge, or push conditions.
Inspect repository state.
git status --short, git branch --show-current, and git remote -v.<secondary_branch> and <primary_branch> using the branch detection rules.Move work onto <secondary_branch>.
<secondary_branch>, continue.git checkout <secondary_branch> and git pull --ff-only origin <secondary_branch>.Commit <secondary_branch> if there are local changes.
git add unless the user requested a narrower scope.type(scope): prefix and a Chinese summary after the colon.--no-verify.<secondary_branch> has no local changes, skip commit and continue to push.Push <secondary_branch>.
git push origin <secondary_branch>.Merge into <primary_branch>.
git checkout <primary_branch>.git pull --ff-only origin <primary_branch>.git merge --no-ff <secondary_branch> -m "chore(<primary_branch>): merge <secondary_branch> into <primary_branch>" to preserve a merge commit when <primary_branch> does not already contain <secondary_branch>.Push <primary_branch>.
git push origin <primary_branch>.Return to <secondary_branch>.
git checkout <secondary_branch>.git status --short and git branch --show-current.<secondary_branch>.Keep the final response concise. Include successful branch pushes and commit hashes. If the host app supports Git directives, emit them only after the matching Git action succeeds.