@moberg_hr/work-tree 1.11.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -82,6 +82,7 @@ work dash
82
82
  ```
83
83
  work init # Interactive first-time setup
84
84
  work tree|t <target> <branch> [flags] # Create or switch to a worktree
85
+ work tree|t <target> # Work on the base repo (no worktree) — pulls + continues the last conversation
85
86
  work tree --here # Infer target+branch from the current worktree
86
87
  work remove <target> <branch> [--force] # Remove a worktree
87
88
  work list [target] # List worktrees
@@ -111,7 +112,16 @@ wd --stop # Stop the background ser
111
112
  wd -c # Interactive review with streaming comments
112
113
  ```
113
114
 
114
- `work tree` flags: `--here` (infer target+branch from cwd), `--base <branch>` (branch from a specific base), `--open` (open the configured editor), `--unsafe` (skip AI-tool permission checks), `--prompt "..."` / `--prompt-file <path>` (send an initial prompt), `--jira-key <KEY>` (link a Jira issue to the session), `--setup-only` (create the worktree without launching the AI tool).
115
+ `work tree` flags: `--here` (infer target+branch from cwd), `--base <branch>` (branch from a specific base), `--open` (open the configured editor), `--unsafe` (skip AI-tool permission checks), `--no-pull` (skip the pull when switching into an existing checkout), `--fresh` (start a new AI conversation instead of continuing the last one), `--prompt "..."` / `--prompt-file <path>` (send an initial prompt), `--jira-key <KEY>` (link a Jira issue to the session), `--setup-only` (create the worktree without launching the AI tool).
116
+
117
+ ### Switching back into a worktree
118
+
119
+ Creating a worktree and *returning* to one are the same command, and the second case is the common one. When the checkout already exists — an existing worktree, or the base repo when you run `work tree <target>` with no branch — `work tree`:
120
+
121
+ 1. **Pulls latest** for the checked-out branch, when it tracks a remote. Best-effort: a purely local branch is skipped silently, and a pull blocked by uncommitted changes or conflicts warns and carries on rather than stopping you from getting in. `--no-pull` skips it.
122
+ 2. **Continues the previous AI conversation** for that directory, by passing the tool's resume flag (`--continue` for Claude Code). This is gated on a transcript actually existing for that exact path, so a first visit starts fresh instead of erroring out. `--fresh` forces a new conversation.
123
+
124
+ A freshly created worktree does neither: it is already at its branch tip and has no conversation to resume.
115
125
 
116
126
  ### Branch resolution order
117
127