Skip to main content

create_worktree

Function create_worktree 

Source
pub fn create_worktree(
    repo_path: &PathBuf,
    default_branch: &str,
    proj_config: &ProjectConfig,
    branch: &str,
) -> Result<(PathBuf, Option<String>)>
Expand description

Create a new git worktree under repo_path for branch. Runs hooks (env copy, post_create) and returns the new worktree path. Returns a warning string if a hook failed (non-fatal).