@gw-tools/gw 0.57.0-beta.56.1 → 0.57.0-beta.56.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.
Files changed (2) hide show
  1. package/README.md +23 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -342,9 +342,18 @@ The tool automatically:
342
342
 
343
343
  1. **Searches for existing config**: Walks up from your current directory looking for `.gw/config.json`
344
344
  2. **Auto-detects git root**: Derives the git root from the config file's location (or detects it if no config exists)
345
- 3. **Creates config**: Saves default settings to `.gw/config.json` (no machine-specific paths stored)
345
+ 3. **Creates config**: Saves default settings to `.gw/config.json` in your worktree root
346
346
 
347
- If auto-detection fails (rare edge cases), you can manually initialize:
347
+ Config is created inside the current worktree so it can be committed to git and shared with your team. This means everyone gets the same `autoCopyFiles`, `hooks`, `defaultBranch`, etc. without each person having to configure it.
348
+
349
+ ```bash
350
+ # Initialize and commit (one-time, from any worktree)
351
+ gw init --auto-copy-files .env --post-checkout "pnpm install"
352
+ git add .gw/config.json
353
+ git commit -m "chore: share gw config"
354
+ ```
355
+
356
+ If auto-detection fails (rare edge cases), you can manually specify the root:
348
357
 
349
358
  ```bash
350
359
  gw init --root /path/to/your/repo.git
@@ -375,14 +384,16 @@ gw init --root /path/to/your/repo.git
375
384
 
376
385
  ### Configuration Options
377
386
 
378
- - **defaultBranch**: Default source worktree name (optional, defaults to "main")
379
- - **autoCopyFiles**: Array of file/directory paths to automatically copy when creating worktrees with `gw checkout` (optional, only set via `gw init --auto-copy-files`)
380
- - **hooks**: Command hooks configuration (optional, set via `gw init --pre-checkout` and `--post-checkout`)
387
+ All fields are optional and safe to commit no machine-specific paths or runtime state is stored.
388
+
389
+ - **defaultBranch**: Default source worktree name (defaults to "main")
390
+ - **autoCopyFiles**: Array of file/directory paths to automatically copy when creating worktrees with `gw checkout` (set via `gw init --auto-copy-files`)
391
+ - **hooks**: Command hooks configuration (set via `gw init --pre-checkout` and `--post-checkout`)
381
392
  - **hooks.checkout.pre**: Array of commands to run before creating a worktree
382
393
  - **hooks.checkout.post**: Array of commands to run after creating a worktree
383
- - **cleanThreshold**: Number of days before worktrees are considered stale for `gw clean` (optional, defaults to 7, set via `gw init --clean-threshold`)
384
- - **autoClean**: Silently remove stale worktrees in the background when running `gw checkout` or `gw list` (optional, defaults to false, set via `gw init --auto-clean`)
385
- - **updateStrategy**: Default strategy for `gw update` command: "merge" or "rebase" (optional, defaults to "merge", set via `gw init --update-strategy`)
394
+ - **cleanThreshold**: Number of days before worktrees are considered stale for `gw clean` (defaults to 7, set via `gw init --clean-threshold`)
395
+ - **autoClean**: Silently remove stale worktrees in the background when running `gw checkout` or `gw list` (defaults to false, set via `gw init --auto-clean`)
396
+ - **updateStrategy**: Default strategy for `gw update` command: "merge" or "rebase" (defaults to "merge", set via `gw init --update-strategy`)
386
397
 
387
398
  ## Commands
388
399
 
@@ -1543,6 +1554,10 @@ gw cd feat/new-feature
1543
1554
  gw init --auto-copy-files .env,components/agents/.env,components/ui/.vercel/ \
1544
1555
  --post-checkout "pnpm install"
1545
1556
 
1557
+ # Commit the config so your team gets the same setup
1558
+ git add .gw/config.json
1559
+ git commit -m "chore: share gw config"
1560
+
1546
1561
  # From within any worktree of your repository
1547
1562
  # Create a new worktree with auto-copy and hooks
1548
1563
  gw add feat/new-feature
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gw-tools/gw",
3
- "version": "0.57.0-beta.56.1",
3
+ "version": "0.57.0-beta.56.3",
4
4
  "description": "A command-line tool for managing git worktrees - copy files between worktrees with ease",
5
5
  "keywords": [
6
6
  "git",