docs(cli): document worktree rm branch cleanup (#16167)

Document that Git worktree removal may also delete the checked-out local branch, while clarifying that --force does not force branch deletion and that Orca retains branches whose changes cannot be proven merged.
This commit is contained in:
erish
2026-08-23 17:32:36 -07:00
committed by GitHub
parent 0a613d5fed
commit 5bcbafff53
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -547,7 +547,8 @@ export function formatFlagHelp(flag: string): string {
'element-index': '--element-index <n> Element index from get-app-state',
title: '--title <text> Custom title for the terminal tab (omit to reset)',
enter: '--enter Append Enter after sending text',
force: '--force Force worktree removal when supported',
force:
'--force Force worktree removal when supported; does not force branch deletion',
focus: '--focus Reveal the created terminal session in Orca',
for: '--for exit|tui-idle Wait condition to satisfy',
'from-element-index': '--from-element-index <n> Source element index from get-app-state',
+4 -1
View File
@@ -170,7 +170,10 @@ export const CORE_COMMAND_SPECS: CommandSpec[] = [
summary: 'Remove a worktree from Orca and git',
usage: 'orca worktree rm --worktree <selector> [--force] [--run-hooks] [--json]',
allowedFlags: [...GLOBAL_FLAGS, 'worktree', 'force', 'run-hooks'],
notes: ['Repo-defined orca.yaml archive hooks are skipped unless --run-hooks is passed.']
notes: [
'Repo-defined orca.yaml archive hooks are skipped unless --run-hooks is passed.',
'For Git worktrees, removal also attempts to delete the checked-out local branch, with or without --force. Orca retains branches it knows predated the worktree and any branch whose changes it cannot prove are already merged.'
]
},
{
path: ['worktree', 'ps'],