@gw-tools/gw 0.12.26 → 0.12.27
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 +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -274,6 +274,9 @@ When `gw add` creates a new branch, it automatically configures the branch to tr
|
|
|
274
274
|
**Git Ref Conflict Detection:**
|
|
275
275
|
The command automatically detects and prevents Git ref naming conflicts. For example, you cannot have both a branch named `test` and `test/foo` because Git stores branches as files in `.git/refs/heads/`, and `test` cannot be both a file and a directory. If a conflict is detected, you'll receive a helpful error message with suggestions for resolving it.
|
|
276
276
|
|
|
277
|
+
**Automatic Navigation:**
|
|
278
|
+
After successfully creating a new worktree, the command automatically navigates to the new worktree directory. This requires shell integration to be installed (see [install-shell](#install-shell)). Use the `--no-cd` flag to skip automatic navigation.
|
|
279
|
+
|
|
277
280
|
**Existing Worktree Navigation:**
|
|
278
281
|
If you try to add a worktree that already exists, the command will prompt you to navigate to it instead. Press Enter (default: Yes) to navigate, or type 'n' to cancel. This requires shell integration to be installed (see [install-shell](#install-shell)).
|
|
279
282
|
|
|
@@ -284,6 +287,8 @@ If you try to add a worktree that already exists, the command will prompt you to
|
|
|
284
287
|
|
|
285
288
|
#### Options
|
|
286
289
|
|
|
290
|
+
- `--no-cd`: Don't navigate to the new worktree after creation
|
|
291
|
+
|
|
287
292
|
All `git worktree add` options are supported:
|
|
288
293
|
|
|
289
294
|
- `-b <branch>`: Create a new branch
|
|
@@ -297,8 +302,12 @@ All `git worktree add` options are supported:
|
|
|
297
302
|
|
|
298
303
|
```bash
|
|
299
304
|
# Create worktree (auto-copies files if autoCopyFiles is configured)
|
|
305
|
+
# Automatically navigates to new worktree
|
|
300
306
|
gw add feat/new-feature
|
|
301
307
|
|
|
308
|
+
# Create worktree without navigating to it
|
|
309
|
+
gw add feat/new-feature --no-cd
|
|
310
|
+
|
|
302
311
|
# Create worktree with new branch
|
|
303
312
|
gw add feat/new-feature -b my-branch
|
|
304
313
|
|