ek9_git_branch

Answers first: current, branchCount and branchNames, then per-branch records (name, current, upstream, ahead/behind, gone, sha).

Category: Enquiry · Compare: git branch / Branches

When to use it

'Which branches exist, what am I on?' - one call, no arguments; pattern:'feature/*' filters, includeRemote:true adds remote-tracking branches.

When not to use it

Details

Headline first: status, summary, current, branchCount and branchNames; then branches[] as {name, current, upstream, ahead, behind, gone, sha} - ahead/behind only with an upstream, gone:true when that upstream no longer exists, sha the 8-hex short form shared with ek9_git_log and ek9_git_blame. verbosity:'summary' keeps the names and drops the records.

Arguments

ArgumentTypeRequiredWhat it is
includeRemotebooleanAlso list remote-tracking branches (origin/...). Default false.
patternstringGlob (* and ?) matched against the short branch name, e.g. 'feature/*'. Default: every branch.

It also takes the arguments every tool takes.