set_upstream

Function set_upstream 

Source
pub fn set_upstream(
    repo: &Repository,
    remote: impl AsRef<str>,
    branch: impl AsRef<str>,
    merge: impl AsRef<str>,
) -> Result<(), Error>
Expand description

Set the upstream of the given branch to the given remote.

This writes to the config directly. The entry will look like the following:

[branch "main"]
    remote = rad
    merge = refs/heads/main