Expand description
Git operations using system git command.
All functions shell out to git via std::process::Command.
This eliminates the heavy gix dependency and works with any
git transport (including dumb HTTP).
Enums§
- GitError
- Error type for git operations.
Functions§
- add_
all_ and_ commit - Add all files and create a commit. Returns the commit SHA.
- add_
remote - Add a remote to the repository.
- checkout_
ref - Checkout a specific ref (commit SHA, tag, or branch).
- clone_
bare_ repo - Clone a git repository as a bare repository.
- clone_
from_ local - Clone from a local bare repository to a working directory.
- clone_
repo - Clone a git repository to the specified destination.
- commit_
exists - Check if a commit exists in the repository.
- fetch_
from_ remote - Fetch from a named remote in the repository.
- fetch_
to_ bare - Fetch from a remote URL into a bare repository.
- get_
head_ commit - Get the current HEAD commit ID as a string.
- get_
remote_ url - Get the URL of a named remote, or None if the remote doesn’t exist.
- get_
root_ commit - Get the root commit SHA (first commit in history) from a working directory.
- get_
root_ commit_ bare - Get the root commit from a bare repository.
- init_
repo - Initialize a new git repository at the given path.
- is_
available - Check if system git is available.
- is_
working_ dir_ clean - Check if the working directory has uncommitted changes.
- set_
remote_ url - Set the URL for an existing remote.