Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Improve --create flag documentation clarity (#214)
Maximilian Roos31214dc17ff4
diff --git a/docs/content/switch.md b/docs/content/switch.mdindex 4d84034bc..43dabf565 100644--- a/docs/content/switch.md+++ b/docs/content/switch.md@@ -30,7 +30,7 @@ When the target branch has no worktree, worktrunk:3. Switches to new directory4. Spawns [post-start hooks](@/hook.md#post-start) (background)-The `--create` flag creates a new branch from `--base` (defaults to default branch). Without `--create`, the branch must already exist.+The `--create` flag creates a new branch from the `--base` branch (defaults to default branch). Without `--create`, the branch must already exist.```bashwt switch feature # Existing branch → creates worktreediff --git a/src/cli.rs b/src/cli.rsindex 2bbb9c6e3..8101bc551 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -2032,7 +2032,7 @@ When the target branch has no worktree, worktrunk:3. Switches to new directory4. Spawns [post-start hooks](@/hook.md#post-start) (background)-The `--create` flag creates a new branch from `--base` (defaults to default branch). Without `--create`, the branch must already exist.+The `--create` flag creates a new branch from the `--base` branch (defaults to default branch). Without `--create`, the branch must already exist.```consolewt switch feature # Existing branch → creates worktreediff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snapindex 7ad96da37..54540f7fa 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap@@ -9,6 +9,7 @@ info:CLICOLOR_FORCE: "1"COLUMNS: "150"GIT_EDITOR: ""+ GIT_FETCH_ARGS: ""SOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml---@@ -87,7 +88,7 @@ When the target branch has no worktree, worktrunk:3. Switches to new directory4. Spawns post-start hooks (background)-The [2m--create[0m flag creates a new branch from [2m--base[0m (defaults to default branch). Without [2m--create[0m, the branch must already exist.+The [2m--create[0m flag creates a new branch from the [2m--base[0m branch (defaults to default branch). Without [2m--create[0m, the branch must already exist.[2mwt switch feature # Existing branch → creates worktree[2mwt switch --create feature # New branch and worktree