ek9_git_fetch

Reports updated, upstream, behind and ahead, a summary line and a nextStep when behind; git's own report under gitReport.

Category: Execution · Compare: git fetch / Fetch

When to use it

'Is there anything new upstream?' - one call, no arguments; updates remote-tracking refs only and reports behind/ahead without touching the working tree. The safe pre-flight before ek9_git_pull.

When not to use it

Details

Safe by construction: fetch only advances remote-tracking refs (origin/main, ...) so it cannot conflict or leave a half-done tree. updated is true when git reported ref updates; upstream/behind/ahead appear only when the current branch has an upstream and match ek9_git_status exactly; gitReport is git's own report. Refusals: no-remote (add one first), timed-out.

Arguments

ArgumentTypeRequiredWhat it is
allRemotesbooleanFetch every remote (--all) instead of one. Default false.
prunebooleanDrop remote-tracking refs deleted on the remote (--prune). Default false.
remotestringRemote name. Default origin.