pub async fn rebase(
repo_path: PathBuf,
target_branch: String,
) -> Result<(), GitError>Expand description
Re-exported rebase/conflict APIs.
Rebases the current branch onto target_branch.
If the rebase fails due to conflict, this function aborts it immediately so the repository does not remain in an in-progress rebase state.
§Arguments
repo_path- Path to the git repository or worktreetarget_branch- Branch to rebase onto (e.g.,main)
§Returns
Ok(()) on success.
§Errors
Returns a GitError if rebase fails, or aborting a conflicted rebase
also fails.