From yangsonhung-awesome-agent-skills
Commits and pushes a work branch, then merges it into the primary branch and pushes both. Useful for two-branch release-sync handoffs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/yangsonhung-awesome-agent-skills:git-push-secondary-merge-primaryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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.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.
npx claudepluginhub yangsonhung/awesome-agent-skills提交并推送工作分支,再合并到主分支并推送双分支结果,最后切回工作分支。适用于需要同步副分支到主分支的 Git 发布同步场景。
Runs verification checks, reviews the diff, picks the integration path (merge, PR, squash, stacked PR), writes the PR/merge message, pushes, and cleans up branches and worktrees.
Pushes local Git commits to remote repositories, handling branch tracking, upstream setup, safe push patterns like force-with-lease, and verification. Useful after local commits when syncing to remote.