Skip to main content

Module git

Module git 

Source
Expand description

Git operations.

Validates git repositories, lists branches, creates and removes worktrees, and derives worktree directory names from project and branch names.

Structs§

WorktreeCreation
Creates a git worktree for the given branch.

Functions§

create_worktree
Creates a git worktree for branch.
delete_branch
Deletes a local git branch.
list_branches
Lists all branches (local and remote), deduplicated, sorted, with remote prefixes stripped.
project_name
Derives the project name from the repository root path.
prune_worktrees
Prunes stale worktree registrations.
remove_worktree
Removes a git worktree at the given path.
validate_repo
Validates that the given path is inside a git repository.
worktree_dir_name
Builds the worktree directory name from a project name and branch.