Skip to main content

Module git

Module git 

Source
Expand description

Git repository operations and utilities.

This module provides functions for interacting with Git repositories, including staging files, getting diffs, and querying repository status.

Functionsยง

assert_git_repo
Ensures the current directory is within a Git repository.
get_changed_files
Returns a list of all changed files (staged, modified, and untracked).
get_commits_between
Returns a list of commit hashes and messages between two branches.
get_current_branch
Returns the current branch name.
get_diff_between
Returns the diff between two branches or commits.
get_recent_commit_messages
Returns recent commit messages for style analysis.
get_remote_url
Returns the remote URL for the origin remote.
get_repo_root
Returns the absolute path to the repository root.
get_staged_diff
Returns the diff of all staged changes.
get_staged_files
Returns a list of files that are currently staged for commit.
stage_files
Stages the specified files for commit.