Push Changes: $ARGUMENTS
CRITICAL: Use
mcp__acp__Bashfor ALL git commands. NEVER use the Task subagent or the built-in Bash tool — they run in an isolated sandbox. Pushes will NOT persist there.
Follow these steps in order. Do not skip steps.
Step 1: Assess State
Run:
- •
git branch --show-currentto get the current branch - •
git remote -vto verify a remote exists - •
git log origin/<branch>..HEAD --onelineto list unpushed commits - •
If no remote is configured: Inform the user and stop.
- •
If no unpushed commits: Inform the user everything is up to date. Stop.
- •
If unpushed commits exist: Proceed to Step 2.
Step 2: Preview
Show the user:
- •Current branch name
- •Number of commits to push
- •Commit list (
git log origin/<branch>..HEAD --oneline) - •Files changed (
git diff origin/<branch>..HEAD --stat)
Safety Check
- •If pushing to
mainormaster: Warn the user explicitly and ask for confirmation before proceeding.
Step 3: Push
Execute git push origin <branch>.
- •Never use
--forceor--force-with-lease - •If the push is rejected (e.g., remote has new commits), inform the user and suggest
git pull --rebasefirst. Do not force-push.
Show the push result.
Step 4: Offer PR Creation (Optional)
If the current branch is not main or master:
- •Ask the user if they want to create a pull request
- •If yes, run
gh pr create --fillor let the user customize the title/body - •If
$ARGUMENTScontains PR-related instructions, use them
If already on main/master, skip this step.
Rules
- •Never force-push under any circumstances
- •Never push without showing what will be pushed first
- •Respect branch protection — if push fails, report the error clearly