pub fn git_remote_branch_exists(
repo_root: &Path,
remote: &str,
branch: &str,
) -> Result<bool, GitError>Expand description
Checks whether a branch exists on the specified remote repository.
Executes git ls-remote --heads <remote> <branch>.
ยงExample
use std::path::Path;
use git_claw::infra::git::git_remote_branch_exists;
let exists = git_remote_branch_exists(Path::new("."), "origin", "feature/login")?;
assert!(exists);