with one click
sync-branch-to-develop
// Use when finishing work on a feature branch and wanting to promote it to develop (or another integration branch) while staying on the original branch. Handles commit, push, merge, push develop, and return.
// Use when finishing work on a feature branch and wanting to promote it to develop (or another integration branch) while staying on the original branch. Handles commit, push, merge, push develop, and return.
Use when adding support for a new locale/language to the Adapty docs site. Covers all hardcoded and dynamic locale registration points, translation commands, sitemap setup, Algolia search config, and the step-by-step order to follow.
Use when reviewing documentation from a product perspective — whether feature value is clear, onboarding flow makes sense, or technical descriptions align with real user experience. Does not check writing style.
Use when adding a new monthly section to src/content/docs/release-notes/whats-new.mdx — gathers commits to main over a date range, identifies user-facing updates worth featuring, confirms scope with the user, then drafts the section in the existing style.
Use when reviewing or writing MDX files in src/content/docs — proofreading, checking technical writing quality, verifying Simplified Technical English compliance, validating links and images, or drafting new doc content.
Walk through unresolved GitHub PR review comments one by one, suggest fixes, and track resolution in a local file. Use when the user wants to address PR feedback.
Use when documentation needs to be planned and written end-to-end — from a Jira task, feature spec, or verbal description through to a polished draft. Not for review-only or planning-only tasks.
| name | sync-branch-to-develop |
| description | Use when finishing work on a feature branch and wanting to promote it to develop (or another integration branch) while staying on the original branch. Handles commit, push, merge, push develop, and return. |
Promote the current branch to the develop integration branch and return, so the user keeps working where they were. The sequence: commit any pending work, push the current branch, fast-forward-update develop, merge the branch into develop, push develop, check out the original branch.
Users end where they started. Never leave them on develop.
develop, main, or another protected trunk → refuse, explain why.develop → confirm the target branch name with the user before proceeding.Before step 1: capture the starting branch with git rev-parse --abbrev-ref HEAD. You return here at the end no matter what — including on failure.
git status --porcelain. Empty → skip this step.git status + git diff (staged + unstaged).git log --oneline -10.git add -A or git add . (risks staging secrets, unrelated files)..env, credentials.json, private keys). Warn and skip.--amend (the failed commit didn't happen), never --no-verify.Match the repo's existing style (check git log --oneline -10 first). General rules:
Commit via HEREDOC (preserves formatting):
git commit -m "$(cat <<'EOF'
Subject line here
Optional short body explaining why.
EOF
)"
git push -u origin <branch>git pushgit fetch origingit checkout developgit pull --ff-only origin developreset --hard or force-pull.git merge --no-ff <branch> — --no-ff keeps the feature branch identifiable in history. Only omit if the user prefers fast-forward merges.-X ours/theirs, --strategy=ours, or force-resolve silently.git push origin developgit checkout <original-branch>git status to confirm state. Report to user: what landed on develop, which commit SHA, remote status.| Step | Command | Skip when |
|---|---|---|
| Commit | git add <files> && git commit -m "msg" | Working tree clean |
| Push branch | git push [-u origin <branch>] | Never |
| Fetch | git fetch origin | Never |
| Update develop | git checkout develop && git pull --ff-only origin develop | Never |
| Merge | git merge --no-ff <branch> | Never |
| Push develop | git push origin develop | Never |
| Return | git checkout <original-branch> | Never |
git add -A / git add . — stage specific files by name.git log for the repo's voice and write a message that says what changed at a conceptual level and why.--no-verify — fix the underlying issue instead.git commit --amend after a hook failure — the failed commit didn't happen; amend would modify the previous real commit. Create a new commit instead.git reset --hard or force-pull on develop divergence — stop and ask.checkout <original-branch> is mandatory.main → develop is not this workflow.git pull --ff-only origin develop fails (diverged)develop, main, or another trunk.env*, *.pem, credentials*)On any red flag: stop the workflow, report state, checkout back to the starting branch if you left it, ask the user.