Skip to content

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.md
index 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 directory
4. 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.
```bash
wt switch feature # Existing branch → creates worktree
diff --git a/src/cli.rs b/src/cli.rs
index 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 directory
4. 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.
```console
wt switch feature # Existing branch → creates worktree
diff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap
index 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 directory
4. Spawns post-start hooks (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.
wt switch feature # Existing branch → creates worktree
wt switch --create feature # New branch and worktree