@gw-tools/gw 0.12.8 → 0.12.10
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 +12 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -39,6 +39,10 @@ A command-line tool for managing git worktrees, built with Deno.
|
|
|
39
39
|
- [Arguments](#arguments-2)
|
|
40
40
|
- [Options](#options-3)
|
|
41
41
|
- [Examples](#examples-5)
|
|
42
|
+
- [clean](#clean)
|
|
43
|
+
- [Options](#options-4)
|
|
44
|
+
- [Examples](#examples-6)
|
|
45
|
+
- [How It Works](#how-it-works-2)
|
|
42
46
|
- [Git Worktree Proxy Commands](#git-worktree-proxy-commands)
|
|
43
47
|
- [list (ls)](#list-ls)
|
|
44
48
|
- [remove (rm)](#remove-rm)
|
|
@@ -174,6 +178,8 @@ gw init --root /path/to/your/repo.git
|
|
|
174
178
|
}
|
|
175
179
|
```
|
|
176
180
|
|
|
181
|
+
**More Examples**: See the [examples/](./examples/) directory for configuration templates for various project types (Next.js, Node.js API, monorepos, CI/CD, etc.).
|
|
182
|
+
|
|
177
183
|
### Configuration Options
|
|
178
184
|
|
|
179
185
|
- **root**: Absolute path to the git repository root (automatically detected or manually set with `gw init`)
|
|
@@ -411,6 +417,7 @@ gw init [options]
|
|
|
411
417
|
- `--auto-copy-files <files>`: Comma-separated list of files to auto-copy when creating worktrees with `gw add`
|
|
412
418
|
- `--pre-add <command>`: Command to run before `gw add` creates a worktree (can be specified multiple times)
|
|
413
419
|
- `--post-add <command>`: Command to run after `gw add` creates a worktree (can be specified multiple times)
|
|
420
|
+
- `--clean-threshold <days>`: Number of days before worktrees are considered stale for `gw clean` (default: 7)
|
|
414
421
|
- `-h, --help`: Show help message
|
|
415
422
|
|
|
416
423
|
#### Examples
|
|
@@ -437,8 +444,11 @@ gw init --default-source master
|
|
|
437
444
|
# Initialize with explicit repository root
|
|
438
445
|
gw init --root /Users/username/Workspace/my-project.git
|
|
439
446
|
|
|
447
|
+
# Initialize with custom clean threshold (14 days instead of default 7)
|
|
448
|
+
gw init --clean-threshold 14
|
|
449
|
+
|
|
440
450
|
# Full configuration example
|
|
441
|
-
gw init --auto-copy-files .env,secrets/ --post-add "pnpm install"
|
|
451
|
+
gw init --auto-copy-files .env,secrets/ --post-add "pnpm install" --clean-threshold 14
|
|
442
452
|
|
|
443
453
|
# Show help
|
|
444
454
|
gw init --help
|
|
@@ -457,6 +467,7 @@ Hooks support variable substitution:
|
|
|
457
467
|
Use `gw init` to:
|
|
458
468
|
- Configure auto-copy files for automatic file copying on worktree creation
|
|
459
469
|
- Set up pre-add and post-add hooks for automation
|
|
470
|
+
- Configure the clean threshold for worktree age management
|
|
460
471
|
- Override the auto-detected repository root (rare)
|
|
461
472
|
- Change the default source worktree from "main" to something else
|
|
462
473
|
|