@gw-tools/gw 0.61.2 → 0.62.0-beta.72.1
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 +20 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1501,11 +1501,24 @@ gw list -v # Verbose output
|
|
|
1501
1501
|
Remove a worktree from the repository. By default, also deletes the local branch to prevent orphaned branches.
|
|
1502
1502
|
|
|
1503
1503
|
```bash
|
|
1504
|
-
gw remove <worktree
|
|
1504
|
+
gw remove <worktree...>
|
|
1505
1505
|
# or
|
|
1506
|
-
gw rm <worktree
|
|
1506
|
+
gw rm <worktree...>
|
|
1507
1507
|
```
|
|
1508
1508
|
|
|
1509
|
+
**Multiple Worktrees & Glob Patterns:**
|
|
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. The batch prompt defaults 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
|
+
|
|
1513
|
+
Supported pattern syntax (quote to prevent shell expansion):
|
|
1514
|
+
|
|
1515
|
+
- `*` — matches anything except `/`
|
|
1516
|
+
- `**` — matches anything including `/` (recursive)
|
|
1517
|
+
- `?` — matches a single character
|
|
1518
|
+
- `[abc]` — matches one of the listed characters
|
|
1519
|
+
|
|
1520
|
+
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
|
+
|
|
1509
1522
|
**Branch Cleanup:**
|
|
1510
1523
|
|
|
1511
1524
|
By default, `gw remove` deletes the local branch after removing the worktree:
|
|
@@ -1531,6 +1544,11 @@ gw remove feat-branch # Remove worktree AND delete local bran
|
|
|
1531
1544
|
gw remove feat-branch --preserve-branch # Remove worktree but KEEP local branch
|
|
1532
1545
|
gw remove --force feat-branch # Force remove worktree and force delete branch
|
|
1533
1546
|
gw rm feat-branch # Using alias
|
|
1547
|
+
gw rm 'test/*' # Remove all worktrees under test/ (with confirmation)
|
|
1548
|
+
gw rm 'feat/*' 'spike/*' --yes # Remove every feat/* and spike/* worktree
|
|
1549
|
+
gw rm feat-a feat-b # Remove multiple worktrees by name
|
|
1550
|
+
gw rm --dry-run 'feat/*' # Preview what would be removed (no changes)
|
|
1551
|
+
gw rm -n 'feat/*' # Same as above using short flag
|
|
1534
1552
|
```
|
|
1535
1553
|
|
|
1536
1554
|
#### move (mv)
|