Enums§
- Branch
Class - Classification of a local branch relative to its origin counterpart.
- MidMerge
State - Describes which incomplete git operation is in progress.
Presence of the corresponding marker file/directory under
.git/is definitive — git creates these for the duration of the operation and removes them on commit or abort.
Functions§
- branch_
tip - Get the commit SHA at the tip of a local branch.
- classify_
branch - Classify
localbranch relative toremoteref using SHA equality and directed ancestry. - commit
- commit_
files_ to_ branch - Commit multiple files to a branch in a single commit without disturbing the working tree.
- commit_
to_ branch - Commit a file to a specific branch without disturbing the current working tree.
- create_
branch_ at - Create a local branch pointing at a specific commit SHA.
- current_
branch - delete_
local_ branch - delete_
remote_ branch - Delete a remote branch on origin.
- detect_
mid_ merge_ state - Detect whether the repo is in a mid-merge, mid-rebase, or mid-cherry-pick state.
- fetch_
all - fetch_
branch - git_
config_ get - has_
commits - has_
remote - is_
ancestor - Check if
commitis a git ancestor ofof_ref(i.e. reachable fromof_ref). Usesgit merge-base --is-ancestor. - is_
file_ tracked - is_
worktree_ dirty - list_
files_ on_ branch - List all files in a directory on a branch (non-recursive).
- local_
branch_ exists - main_
worktree_ root - merge_
base - Run
git merge-base ref1 ref2and return the common ancestor SHA. - merge_
branch_ into_ default - merge_
into_ default - merge_
ref - merged_
into_ main - ticket/* branches that are merged into the default branch (remote or local),
including branches that were squash-merged (not detected by
--merged). - move_
files_ on_ branch - Move files on a branch in a single commit.
Each element of
movesis (old_rel_path, new_rel_path, content). Writes each new file, stages it, then removes each old file viagit rm. Uses the same permanent-worktree / temp-worktree pattern as commit_files_to_branch. - prune_
remote_ tracking - pull_
default - push_
branch - push_
branch_ tracking - push_
ticket_ branches - Push all local ticket/* branches that have commits not yet on origin. Non-fatal: logs warnings on push failure. No-op when no origin is configured.
- read_
from_ branch - Read a file’s content from a branch ref without changing working tree. Prefers the local ref (reflects recent commits before push); falls back to origin when no local ref exists.
- remote_
branch_ tip - Get the commit SHA at the tip of the remote tracking ref for a branch.
- remote_
ticket_ branches_ with_ dates - Merge
branchintodefault_branch(fast-forward or merge commit). Pushesdefault_branchto origin when a remote exists. List remote ticket/* branches with their last commit date. Returns (branch_name_without_origin_prefix, commit_date) pairs. - resolve_
branch_ sha - Resolve a branch name to a commit SHA.
Prefers
origin/<branch>; falls back to local<branch>. - stage_
files - sync_
default_ branch - Bring local
defaultbranch into sync withorigin/<default>without ever pushing. - sync_
non_ checked_ out_ refs - Sync non-checked-out
ticket/*andepic/*local refs with their origin counterparts. - ticket_
branches - All ticket/* branch names visible locally or remotely (deduplicated). Local branches are included even when a remote exists, so that unpushed branches (e.g. just created) are visible without a push.