@gw-tools/gw 0.62.0-beta.72.1 → 0.62.0-beta.72.3
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 +16 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1508,15 +1508,23 @@ gw rm <worktree...>
|
|
|
1508
1508
|
|
|
1509
1509
|
**Multiple Worktrees & Glob Patterns:**
|
|
1510
1510
|
|
|
1511
|
-
You can remove several worktrees at once, either by listing them or by using a glob pattern. When more than one worktree resolves, gw shows the list and asks for confirmation before anything is removed.
|
|
1511
|
+
You can remove several worktrees at once, either by listing them or by using a glob pattern. When more than one worktree resolves, gw shows the list and asks for confirmation before anything is removed. **Confirmation prompts default to yes** — just press Enter to proceed, or type `n` / `no` to cancel. Use `--dry-run` (or `-n`) to preview what would be removed without making any changes.
|
|
1512
1512
|
|
|
1513
|
-
|
|
1513
|
+
With shell integration installed (`eval "$(gw install-shell)"`), you can use unquoted glob patterns: `gw rm fix/*`. The integration aliases `gw` with `noglob` for zsh so the shell doesn't try to expand the pattern against the current directory first. Without integration — or in bash with non-default options like `failglob` — quote the pattern: `gw rm 'fix/*'`.
|
|
1514
1514
|
|
|
1515
|
-
|
|
1515
|
+
Supported pattern syntax:
|
|
1516
|
+
|
|
1517
|
+
- `*` — in a bare-name pattern (no `/`), matches anything including `/`. In a path-aware pattern (contains `/`), matches anything except `/`.
|
|
1516
1518
|
- `**` — matches anything including `/` (recursive)
|
|
1517
1519
|
- `?` — matches a single character
|
|
1518
1520
|
- `[abc]` — matches one of the listed characters
|
|
1519
1521
|
|
|
1522
|
+
The `/`-aware split is what most people mean intuitively:
|
|
1523
|
+
|
|
1524
|
+
- `fix*` — "anything starting with `fix`" → matches `fix/agent0-foo`, `fix-branch`, `fixture`
|
|
1525
|
+
- `fix/*` — "direct children of `fix/`" → matches `fix/agent0-foo` but NOT `fix/sub/nested`
|
|
1526
|
+
- `fix/**` — "everything under `fix/`" → matches both
|
|
1527
|
+
|
|
1520
1528
|
In batch mode, dirty worktrees (uncommitted or unpushed) are skipped with a warning instead of being prompted one-by-one. Use `--force` to remove them anyway. Protected branches are silently filtered out of pattern matches.
|
|
1521
1529
|
|
|
1522
1530
|
**Branch Cleanup:**
|
|
@@ -1544,11 +1552,12 @@ gw remove feat-branch # Remove worktree AND delete local bran
|
|
|
1544
1552
|
gw remove feat-branch --preserve-branch # Remove worktree but KEEP local branch
|
|
1545
1553
|
gw remove --force feat-branch # Force remove worktree and force delete branch
|
|
1546
1554
|
gw rm feat-branch # Using alias
|
|
1547
|
-
gw rm
|
|
1548
|
-
gw rm '
|
|
1555
|
+
gw rm test/* # Remove all worktrees under test/ (with shell integration)
|
|
1556
|
+
gw rm 'test/*' # Same — explicit quoting if you don't have shell integration
|
|
1557
|
+
gw rm feat/* spike/* --yes # Remove every feat/* and spike/* worktree
|
|
1549
1558
|
gw rm feat-a feat-b # Remove multiple worktrees by name
|
|
1550
|
-
gw rm --dry-run
|
|
1551
|
-
gw rm -n
|
|
1559
|
+
gw rm --dry-run feat/* # Preview what would be removed (no changes)
|
|
1560
|
+
gw rm -n feat/* # Same as above using short flag
|
|
1552
1561
|
```
|
|
1553
1562
|
|
|
1554
1563
|
#### move (mv)
|