Expand description
Git utility functions for the Sprite multi-agent workflow toolkit.
This module provides functions for managing git repositories, worktrees, branches, and other git operations needed for agent workspace management.
Structs§
- GitStatus
- Git repository status information.
- Worktree
Info - Information about a git worktree.
Functions§
- add
- Add files to git staging area.
- branch_
exists - Check if a git branch exists.
- checkout_
branch - Checkout a branch in a specific path.
- commit
- Commit changes with a message.
- create_
branch - Create a new git branch.
- create_
branch_ from - Create a new git branch from a specific starting point.
- create_
worktree - Create a git worktree for an agent.
- delete_
branch - Delete a git branch.
- force_
delete_ branch - Force remove a git branch, even if it has unmerged changes.
- get_
branch_ commit - Get the current commit hash of a branch.
- get_
branches_ containing_ commit - Get a list of all branches that contain the given commit.
- get_
current_ branch - Get the current git branch name.
- get_
current_ branch_ at - Get the current git branch name at a specific path.
- get_
current_ commit - Get the current git commit hash.
- get_
git_ root - Get the current git repository root directory.
- get_
remote_ url - Get the git remote URL.
- get_
status - Get the git repository status.
- get_
status_ at - Get the git repository status at a specific path.
- get_
status_ string - Get the git repository status as a string.
- get_
status_ string_ at - Get the git repository status as a string at a specific path.
- has_
merge_ conflicts - Check if there are merge conflicts after a merge operation.
- has_
uncommitted_ changes - Check if a file has uncommitted changes.
- is_
branch_ merged - Check if a branch has been merged into the current branch.
- is_
git_ repository - Check if the current directory is a git repository.
- is_
git_ repository_ at - Check if a specific path is a git repository.
- list_
worktrees - List all git worktrees in the repository.
- merge_
branch - Merge a branch into the current branch.
- prune_
worktrees - Prune stale worktree references.
- pull
- Pull changes from the remote repository.
- push
- Push changes to the remote repository.
- remove_
worktree - Remove a git worktree.
- remove_
worktree_ reference - Remove a worktree reference without removing the directory.
- safe_
delete_ branch - Safely remove a git branch, checking if it’s merged first.
- switch_
branch - Switch to an existing git branch.
- switch_
branch_ at - Switch to an existing git branch at a specific path.
- validate_
git_ repository - Validate that we’re in a git repository.