Skip to main content

Module git

Module git 

Source
Expand description

Git CLI command wrappers for repository discovery, merge, and path resolution.

Functionsยง

git_branch_exists
Checks if a branch exists locally in the repository.
git_checkout
Switches to the specified branch.
git_create_annotated_tag
Creates an annotated Git tag on target_ref.
git_delete_remote_branch
Deletes a branch from the specified remote repository.
git_get_remotes
Returns the list of configured Git remotes in the repository.
git_head_commit
Resolves the abbreviated HEAD commit hash for a worktree.
git_is_clean
Checks whether the Git repository working tree has any unstaged or staged modifications.
git_merge
Merges branch into the currently checked-out branch.
git_push_upstream
Pushes the branch to the specified remote repository and configures upstream tracking.
git_remote_branch_exists
Checks whether a branch exists on the specified remote repository.
git_worktree_prune
Runs git worktree prune to clean internal Git worktree tracking.
resolve_git_common_dir
Resolves the Git common directory (git rev-parse --git-common-dir) for repository-wide state like claw/slots.json and claw/slots.lock.
resolve_repo_name
Extracts repository name from top-level directory.
resolve_toplevel
Resolves the top-level repository working tree directory (git rev-parse --show-toplevel).