Push
pushPublish the current branch to its upstream across selected repositories, starting tracking for never-published branches. Preview targets with a dry run; remote history is never force-overwritten.
Instructions
git push the current branch to its upstream across the selected repos; a branch that was never pushed is published (git push -u origin HEAD) so it starts tracking. Never force-pushes (git rejects non-fast-forward pushes), so it can't overwrite remote history. Pair after commit to land a cross-repo change. Pushes the main checkout only; add worktrees: true to also push the branches of linked worktrees, where coding agents leave commits (the dry run names them). Requires a selector. Executing needs --allow-writes; dry_run:true previews the targets.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"selector": "<selector>"
},
"name": "push"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview the resolved target set without acting. | |
| selector | Yes | Predicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (* stays within one path segment, ** crosses /), root, group (a config-defined cluster name, e.g. "payments"). Local state: dirty, ahead (alias unpushed), behind, diverged, no_upstream, unpublished (a branch never pushed although the repo has a remote), stale_fetch (remote not fetched for over 14 days), has_stash, worktree_work (a linked worktree holds uncommitted files or commits never pushed), detached, conflicted, in_operation (merge/rebase/… mid-flight), error, branch (glob like name, e.g. "feat/*"; an exact name matches itself), attention ("any"|"notice"|"warn"|"risk"). Remote (needs a GitHub token): ci ("passing"|"failing"|"pending"|"none"), min_prs (int). Combine: any_of[selector] (OR), not (selector). The empty selector {} matches NOTHING by design — pass {"all": true} for the whole fleet. | |
| worktrees | No | Also act in each selected repo's linked worktrees, where coding agents leave work: push their branches to origin (publishing a new one) or commit their files on their own branches. Off by default; without it the result and the dry run say what was left in them. Preview with dry_run first. |