pub async fn push_current_branch(repo_path: PathBuf) -> Result<String, GitError>Expand description
Re-exported commit/sync/diff APIs.
Pushes the current branch to its upstream remote with
--force-with-lease.
Falls back to git push --force-with-lease --set-upstream origin HEAD
when no upstream branch is configured, then returns the resolved upstream
reference.
§Arguments
repo_path- Path to the git repository or worktree
§Returns
The upstream reference on success.
§Errors
Returns a GitError if git push fails or upstream tracking cannot be
resolved afterwards.