Skip to main content

git

Function git 

Source
pub fn git(current_dir: impl AsRef<Path>, arguments: &str) -> Result<String>
Expand description

Run git in current_dir with shell-like whitespace-separated arguments, returning stdout as UTF-8.

Note that Git is run as isolated as possible, just like scripts.

Arguments may be split across multiple lines. Single and double quotes can be used to keep whitespace within an argument, for example commit -m 'a message with spaces'.