Skip to main content

commit

Function commit 

Source
pub fn commit(dir: &Path, message: &str) -> Result<(), String>
Expand description

Commit the staged changes with message. Returns Ok(()) on success, or the captured stderr on failure (e.g. nothing staged, hook rejected).

ยงErrors

Returns the trimmed stderr text when git commit exits non-zero or cannot run.