Module git

Module git 

Source

Enums§

GitError

Functions§

add_all
Add all changes to the staging area.
add_excluding_projects
add_remote
Add a new remote repository to the current Git repository. git remote add origin
branch_exists_locally
Check if the branch exists locally.
checkout_main
Check out the main branch.
commit
Commit changes with a message.
create_branch
Create a new branch from the current HEAD or a specified point.
create_tag
Create a new tag with a message at a specific commit hash.
delete_local_branch
Delete a local short-lived branch.
delete_remote_branch
Delete a remote branch.
fetch_origin
Fetch the latest changes from the origin remote.
find_branch
Find a branch by name
get_commit_history
Get the commit history in a specific range.
get_current_branch
Get the current branch name.
get_git_root
Find the root directory of the Git repository and return its path.
get_head_commit_hash
Get the hash of the current HEAD commit.
get_latest_tag
Get the latest tag in the repository. This returns the most recent tag, which is useful for versioning.
get_remote_url
Get the remote URL of the repository.
get_stale_branches
Check for stale branches in the repository.
get_status_full
get_status_short
has_staged_changes
Checks if there are any changes in the staging area.
init_git_repository
Initialise a new Git repository in the current directory.
is_git_repository
Check if the current dir is a valid Git repository.
is_working_directory_clean
Checks if the git working directory is clean.
log_graph
Show recent commits in the repository, 15 by default.
merge_branch
Merge the current branch with another branch.
pull_latest_with_rebase
Pull the latest changes with rebase.
push
Push changes to the remote repository.
push_set_upstream
Push a new branch to the remote repository and set it as upstream. This is useful for new branches that have not been pushed before.
push_tags
Push all tags to the remote repository.
rebase_onto_main
Rebase the current branch onto the main branch.
remote_branch_exists
Check if a remote branch exists. This checks if a branch exists on the remote repository (e.g. origin).
status
Show the current status of the repository.
status_excluding_projects
Show the current status of the repository, excluding changes in specified project directories.
status_for_path
tag_exists
Check if the tag exists in the repository.