Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

docs: add pnpm post-create example for copy-ignored (#1581)

worktrunk-bot5eb522cf4294
diff --git a/docs/content/hook.md b/docs/content/hook.md
index b3fe01999..7157ebdcc 100644
--- a/docs/content/hook.md
+++ b/docs/content/hook.md
@@ -329,7 +329,13 @@ Git worktrees share the repository but not untracked files. [`wt step copy-ignor
copy = "wt step copy-ignored"
```
-Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
+Use `post-create` instead if subsequent hooks need the copied files — for example, copying `node_modules/` before `pnpm install` so the install reuses cached packages:
+
+```toml
+[post-create]
+copy = "wt step copy-ignored"
+install = "pnpm install"
+```
## Dev servers
diff --git a/skills/worktrunk/reference/hook.md b/skills/worktrunk/reference/hook.md
index fb4b12904..199ae81b1 100644
--- a/skills/worktrunk/reference/hook.md
+++ b/skills/worktrunk/reference/hook.md
@@ -320,7 +320,13 @@ Git worktrees share the repository but not untracked files. [`wt step copy-ignor
copy = "wt step copy-ignored"
```
-Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
+Use `post-create` instead if subsequent hooks need the copied files — for example, copying `node_modules/` before `pnpm install` so the install reuses cached packages:
+
+```toml
+[post-create]
+copy = "wt step copy-ignored"
+install = "pnpm install"
+```
## Dev servers
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 1ed3915d5..dc30f7c4b 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1416,7 +1416,13 @@ Git worktrees share the repository but not untracked files. [`wt step copy-ignor
copy = "wt step copy-ignored"
```
-Use `post-create` instead if subsequent hooks or `--execute` command need the copied files immediately.
+Use `post-create` instead if subsequent hooks need the copied files — for example, copying `node_modules/` before `pnpm install` so the install reuses cached packages:
+
+```toml
+[post-create]
+copy = "wt step copy-ignored"
+install = "pnpm install"
+```
## Dev servers