Skip to main content

add

Function add 

Source
pub fn add(
    repo: &Path,
    template: &Path,
    template_start: &str,
    wt: &Path,
    new_branch: Option<&str>,
    commitish: Option<&str>,
) -> Result<()>
Expand description

Create wt by cloning template, refreshed to template_start and warmed from repo first. new_branch and commitish are git worktree add’s. Like it, refuses a wt that exists and is not empty, and on error removes only the worktree and branch this call created