Skip to main content

remove_worktree

Function remove_worktree 

Source
pub fn remove_worktree(path: &Path) -> Result<()>
Expand description

Removes a git worktree and cleans up its directory.

This function is idempotent - it does not error if the worktree is already gone.

§Arguments

  • path - The path to the worktree to remove

§Returns

Ok(()) if the worktree was successfully removed or didn’t exist.