ek9_git_push

Reports remote, branch, upstream, upToDate and a summary line, with git's own report under gitReport; outward-facing and not trivially reversible, so confirm intent first.

Category: Execution · Compare: git push / Push

When to use it

'Publish my commits' - one call, no arguments for the current branch to origin; setUpstream:true on a new branch's first push. The last step of stage, commit, push and outward-facing: confirm intent before calling.

When not to use it

Details

Defaults: remote origin, the current branch. force:true is --force-with-lease (refuses to clobber un-fetched upstream work); a bare --force is deliberately not exposed. Refusals name the route: no-remote (add one), rejected (ek9_git_fetch then ek9_git_pull, then push again), timed-out.

Arguments

ArgumentTypeRequiredWhat it is
branchstringBranch to push. Default: the current branch.
forcebooleanReplace the remote branch with --force-with-lease (refuses when the remote moved since the last fetch). Default false.
remotestringRemote name. Default origin.
setUpstreambooleanSet the upstream tracking ref (-u) - the first push of a new branch. Default false.