Skip to main content

git_push

Function git_push 

Source
pub fn git_push(remote: &str, branch: &str) -> Result<()>
Expand description

Pushes the current branch to the remote repository.

§Arguments

  • remote - The name of the remote to push to (e.g., “origin”)
  • branch - The name of the branch to push

§Errors

Returns an error if the push fails or if the repository cannot be accessed.

§Examples

use rusty_commit::git;

git::git_push("origin", "main").unwrap();