pub async fn exit_worktree() -> Result<PathBuf>Expand description
Exit the current worktree and return to the main repository.
Changes the current directory to the main repository root.
§Errors
Returns an error if:
- Not in a worktree
- Cannot determine main repo path
- Cannot change directory