| name | push |
| description | Pushes previously finished commits to remote only; never stages, commits, or amends. Use when finish has already run, the working tree is clean, and local commits exist. If uncommitted changes remain, stop and run finish first. |
push
Push previously finished work to remote. This command is push-only.
Preconditions (Mandatory)
finish must have been executed first for the changes you want to push.
finish is the only command that may prepare and commit those changes.
- Working tree must be clean before push:
- no unstaged changes
- no staged but uncommitted changes
- no untracked files that belong to the intended change set
- There must be at least one local commit to push.
Hard Restrictions
- Never run
git add in this command.
- Never run
git commit in this command.
- Never create, amend, or modify commits in this command.
- If there are uncommitted changes, STOP and instruct the user to run
finish first.
Push Safety Flow
- Verify branch (never push from
main or develop for development flow).
- Verify clean working tree.
- Verify commits exist to push.
- Verify remote freshness before push:
- Run
git fetch origin
- Check whether local branch is behind its remote counterpart
- If behind, STOP and sync first (rebase or merge) before pushing
- Confirm push target relevance:
- Preferred: push feature branch (
feature/*) and open a PR to develop
develop: never push directly — ruleset requires PR
main: never push directly except Promote to production workflow (or documented one-time bootstrap ff); integration goes to develop via PR
- App-specific changes: ensure remote points to app repo, not boilerplate repo
- Ask user for explicit confirmation: "Ready to push these already-committed changes?"
- Execute push only after confirmation.
Relationship with finish
finish and push are intentionally split.
finish = cleanup + version/changelog sync + commit (local only).
push = remote validation + push (no commit operations).
- If
push detects anything that still needs committing, it must stop and redirect to finish.
You have explicit access to use console commands for this task.
Boundaries
Not push | Use instead |
|---|
| Stage, commit, version, changelog | finish |
First push of a new feature/* branch | Normal flow — push with -u, then open a PR to develop |