Skip to main content

Module git

Module git 

Source
Expand description

Git utilities for clone, branch management, and repo inspection. Port of src/core/git/git-utils.ts

Structs§

BranchStatus
ClonedRepoInfo
CommitInfo
DiscoveredSkill
GitCommitDetail
GitCommitFileChange
GitFileChange
GitGraphEdge
GitLogCommit
GitLogPage
GitLogRef
GitRefsResult
HistoricalRelatedFile
ParsedGitHubUrl
RepoBranchInfo
RepoChanges
RepoCommitDiff
RepoFileDiff
RepoStatus
WorktreeListEntry

Enums§

CommitFileChangeKind
FileChangeStatus
GitRefKind

Functions§

branch_exists
Check if a local branch exists.
branch_to_safe_dir_name
Sanitize a branch name for use as a directory name.
checkout_branch
compute_historical_related_files
Build historical co-change context for a review diff range.
copy_dir_recursive
Recursively copy a directory, skipping .git and node_modules.
create_commit
Create a commit with the given message If files are provided, stages them first Returns the SHA of the created commit
delete_branch
dir_name_to_repo
discard_changes
Discard changes to files in working directory WARNING: This is destructive and cannot be undone
discover_skills_from_path
Discover skills from a given path (looks for SKILL.md files in well-known subdirectories).
fetch_remote
get_branch_info
get_branch_status
get_clone_base_dir
Base directory for cloned repos.
get_commit_list
Get commit history from current branch
get_current_branch
get_default_workspace_worktree_root
Default worktree root for a workspace: ~/.routa/workspace/{workspaceId}
get_git_commit_detail
get_git_log_page
get_repo_changes
get_repo_commit_diff
get_repo_file_diff
get_repo_status
get_worktree_base_dir
Base directory for worktrees: ~/.routa/worktrees/
git_command
git_tokio_command
is_git_repository
list_cloned_repos
List all cloned repos with branch and status info.
list_git_refs
list_local_branches
list_remote_branches
parse_git_status_porcelain
parse_github_url
Parse a GitHub URL or owner/repo shorthand.
pull_branch
pull_commits
Pull commits from remote
rebase_branch
Rebase current branch onto target branch
repo_to_dir_name
reset_branch
Reset branch to a specific commit or branch mode: “soft” keeps changes staged, “hard” discards all changes
reset_local_changes
stage_files
Stage files in the Git index
unstage_files
Unstage files from the Git index (keep working directory changes)
worktree_add
Add a new git worktree. If create_branch is true, creates a new branch.
worktree_list
List all worktrees for a repository.
worktree_prune
Prune stale worktree references.
worktree_remove
Remove a git worktree.