We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
commit_and_push()
1 parent 495b8dc commit 8180544Copy full SHA for 8180544
src/git.rs
@@ -275,6 +275,13 @@ impl Repository {
275
ref_status
276
}
277
278
+ /// Commits the specified file with the specified commit message and pushes
279
+ /// the commit to the `master` branch on the `origin` remote.
280
+ ///
281
+ /// Note that `modified_file` expects an **absolute** file path!
282
283
+ /// This function also prints the commit message and a success or failure
284
+ /// message to the console.
285
pub fn commit_and_push(&self, message: &str, modified_file: &Path) -> Result<(), PerformError> {
286
println!("Committing and pushing \"{}\"", message);
287
0 commit comments