Skip to main content

git_push_upstream

Function git_push_upstream 

Source
pub fn git_push_upstream(
    repo_root: &Path,
    remote: &str,
    branch: &str,
) -> Result<(), GitError>
Expand description

Pushes the branch to the specified remote repository and configures upstream tracking.

Executes git push -u <remote> <branch>.

ยงExample

use std::path::Path;
use git_claw::infra::git::git_push_upstream;

git_push_upstream(Path::new("."), "origin", "feature/login")?;