Skip to main content

remove_worktree

Function remove_worktree 

Source
pub fn remove_worktree<P: AsRef<Path>>(path: P, force: bool) -> Result<()>
Expand description

Remove a worktree at the specified path.

By default, this will fail if the worktree has uncommitted changes. Use force: true to remove even with uncommitted changes.

§Arguments

  • path - The path of the worktree to remove
  • force - If true, remove even if the worktree has uncommitted changes

§Returns

  • Ok(()) - Worktree removed successfully
  • Err - If removal fails