pub fn worktree_add(
repo_path: &Path,
branch: &str,
wt_path: &Path,
) -> Result<bool, String>Expand description
Adds a worktree at wt_path for branch. An existing branch, tag or
commit is checked out there, and a branch that only exists on one remote
becomes a local branch tracking it (git’s own guess). Any other name
creates that branch, at HEAD, for the new worktree. Returns whether a new
branch was created.