pub fn commit_and_push(&self, message: &str, modified_file: &Path) -> anyhow::Result<()> {
        println!("Committing and pushing \"{message}\"");

        let relative_path = modified_file.strip_prefix(self.checkout_path.path())?;
        self.perform_commit_and_push(message, relative_path)
            .map(|_| println!("Commit and push finished for \"{message}\""))
            .map_err(|err| {
                eprintln!("Commit and push for \"{message}\" errored: {err}");
                err
            })
    }
/// Commits the specified file with the specified commit message and pushes
/// the commit to the `master` branch on the `origin` remote.
///
/// Note that `modified_file` expects an **absolute** file path!
///
/// This function also prints the commit message and a success or failure
/// message to the console.
Commits the specified file with the specified commit message and pushes
the commit to the `master` branch on the `origin` remote.

Note that `modified_file` expects an **absolute** file path!

This function also prints the commit message and a success or failure
message to the console.
Commits the specified file with the specified commit message and pushes the commit to the ` master ` branch on the ` origin ` remote . Note that ` modified_file ` expects an ** absolute ** file path! This function also prints the commit message and a success or failure message to the console .
pub fn commit_and_push(&self, message: &str, modified_file: &Path) -> anyhow::Result<()> {
        println!("Committing and pushing \"{message}\"");
        let relative_path = modified_file.strip_prefix(self.checkout_path.path())?;
        self.perform_commit_and_push(message, relative_path)
            .map(|_| println!("Commit and push finished for \"{message}\""))
            .map_err(|err| {
                eprintln!("Commit and push for \"{message}\" errored: {err}");
                err
            })
    }
pub fn commit_and_push ( & self , message : & str , modified_file : & Path ) -> anyhow :: Result < ( ) > { println ! ( " \" \" " ) ; let relative_path = modified_file . strip_prefix ( self . checkout_path . path ( ) ) ? ; self . perform_commit_and_push ( message , relative_path ) . map ( | _ | println ! ( " \" \" " ) ) . map_err ( | err | { eprintln ! ( " \" \" " ) ; err } ) }
Commits the specified file with the specified commit message and pushes
the commit to the `master` branch on the `origin` remote.
Commits the specified file with the specified commit message and pushes the commit to the ` master ` branch on the ` origin ` remote .
&self
message
&str
modified_file
&Path