Skip to main content

Module git

Module git 

Source
Expand description

Git operations: cloning, fetching, branch detection, and worktree creation.

Functionsยง

bare_clone
Clone url as a bare repository into dest.
branch_exists_local
Return true if branch exists as a local branch in repo.
branch_exists_remote
Return true if branch exists as a remote-tracking ref in the bare clone.
create_local_worktree
Create a worktree from a local (non-bare) repository without referencing a remote.
create_worktree
Create a worktree inside a bare clone.
detect_default_branch
Detect the default branch of a bare remote repository.
detect_local_default_branch
Detect the current branch of a local (non-bare) repository.
git_fetch
Fetch the latest refs from origin for a bare clone at bare.