Skip to main content

Module git

Module git 

Source

Functionsยง

commit_is_merge
commit_is_pushed
compute_next_minor_tag
Compute the next minor semver tag from latest tag.
create_tag
Create a git lightweight tag.
ensure_ancestor_of_head
ensure_commit_exists
ensure_head_exists
filter_diff_by_globs
Filter unified diff to exclude files matching glob patterns. Files matching any pattern are removed from the diff output but will still be committed.
find_repo_root
Find the git repository root directory
get_commit_diff
get_latest_tag
Returns the latest tag according to git version sorting.
get_range_diff
get_staged_diff
Get the output of git diff --staged
get_staged_diff_filtered
Get staged diff with files filtered by glob patterns. Excluded files are still committed, just not sent to the LLM for analysis.
has_upstream_branch
head_is_merge_commit
Returns true if HEAD has multiple parents
is_head_commit
is_head_pushed
Returns true when HEAD exists on upstream branch
list_staged_files
List staged file paths
rewrite_commit_message
run_commit
Run git commit -m "<message>" [extra_args...]
run_push
Run git push
undo_last_commit_soft
Undo latest commit, keep all changes staged