Expand description
Git commit and push operations.
This module provides functions for creating commits, restoring tracked paths, and pushing to upstream remotes. It handles error classification and provides clear feedback on failures.
§Invariants
- Upstream must be configured before pushing
- Empty commit messages are rejected
- No-changes commits are rejected
- Path restores only operate on tracked files under the repo root
§What this does NOT handle
- Status checking (see git/status.rs)
- LFS validation (see git/lfs.rs)
- Repository cleanliness (see git/clean.rs)
Functions§
- abort_
rebase - Abort an in-progress rebase.
- add_
paths_ force - Force-add existing paths, even if they are ignored.
- commit_
all - Create a commit with all changes.
- fetch_
branch - Fetch a specific branch from origin.
- is_
ahead_ of_ upstream - Check if HEAD is ahead of the configured upstream.
- is_
behind_ upstream - Check if the current branch is behind its upstream.
- list_
conflict_ files - List files with merge conflicts.
- push_
current_ branch - Push the current branch to a remote.
- push_
head_ to_ branch - Push HEAD to a specific branch on a remote.
- push_
upstream - Push HEAD to the configured upstream.
- push_
upstream_ allow_ create - Push HEAD to origin and create upstream tracking.
- push_
upstream_ with_ rebase - Push HEAD to upstream, rebasing on non-fast-forward rejections.
- rebase_
onto - Rebase current branch onto a target reference.
- restore_
tracked_ paths_ to_ head - Restore tracked paths to the current HEAD (index + working tree).
- revert_
uncommitted - Revert uncommitted changes, restoring the working tree to current HEAD.
- upstream_
ref - Get the configured upstream for the current branch.