Skip to main content

git_get_remotes

Function git_get_remotes 

Source
pub fn git_get_remotes(repo_root: &Path) -> Result<Vec<String>, GitError>
Expand description

Returns the list of configured Git remotes in the repository.

ยงExample

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

let remotes = git_get_remotes(Path::new("."))?;
assert!(remotes.contains(&"origin".to_string()));