@gw-tools/gw 0.37.0 → 0.38.0-beta.36.2

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 +8 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -252,7 +252,7 @@ gw sync feat-existing-branch .env
252
252
 
253
253
  - **Easy setup**: Clone and configure repositories in one command with `gw init <url> --interactive`
254
254
  - **Quick navigation**: Navigate to worktrees instantly with smart partial matching (`gw cd feat` finds `feat-branch`)
255
- - **Smart checkout**: `gw checkout` handles worktree-specific scenarios, navigating to branches checked out elsewhere instead of showing errors
255
+ - **Smart checkout**: `gw checkout` handles worktree-specific scenarios, navigating to branches checked out elsewhere instead of showing errors, and properly recreating local tracking branches from remote after `gw remove`
256
256
  - **Auto-copy files**: Configure once, automatically copy `.env`, secrets, and config files to every new worktree
257
257
  - **Hooks support**: Run commands before/after worktree creation (install dependencies, validate setup, etc.)
258
258
  - **Copy files between worktrees**: Easily copy secrets, environment files, and configurations from one worktree to another
@@ -475,12 +475,10 @@ gw checkout feat/new-feature .env secrets/
475
475
  # Force create even if branch exists elsewhere
476
476
  gw checkout feat/bugfix -f
477
477
 
478
- # Create worktree for remote branch (prompts)
478
+ # Create worktree for remote-only branch (auto-creates local tracking branch)
479
479
  gw checkout remote-feature
480
- # Output: Branch remote-feature exists on remote but not locally.
481
- #
482
- # Create a new worktree for it? [Y/n]:
483
- # (If yes, creates the worktree)
480
+ # Output: Branch remote-feature exists on remote but not locally, creating from remote...
481
+ # Creates worktree with proper local tracking branch (git push/pull work automatically)
484
482
 
485
483
  # Already on the branch
486
484
  gw checkout current-branch
@@ -1202,7 +1200,7 @@ gw sync /full/path/to/repo/feat-branch .env
1202
1200
 
1203
1201
  Remove safe worktrees with no uncommitted changes and no unpushed commits. By default, removes **ALL** safe worktrees regardless of age. Use `--use-autoclean-threshold` to only remove worktrees older than the configured threshold.
1204
1202
 
1205
- **Automatic Pruning:** The clean command automatically runs `git worktree prune` before listing worktrees, ensuring only worktrees that actually exist on disk are shown. This prevents "phantom" worktrees (manually deleted directories) from appearing in the list.
1203
+ **Automatic Pruning:** The clean command automatically runs `git worktree prune` before listing worktrees, ensuring only worktrees that actually exist on disk are shown. This prevents "phantom" worktrees (manually deleted directories) from appearing in the list. After removing worktrees, it also automatically prunes any orphan branches (branches with no associated worktree and no unpushed commits).
1206
1204
 
1207
1205
  **Note:** For automatic cleanup, see `gw init --auto-clean`. The `clean` command provides interactive, manual cleanup with detailed output and confirmation prompts.
1208
1206
 
@@ -1254,6 +1252,7 @@ The clean command:
1254
1252
  3. Verifies they have no unpushed commits (unless `--force`)
1255
1253
  4. Prompts for confirmation before deleting (unless `--dry-run`)
1256
1254
  5. Never removes bare/main repository worktrees
1255
+ 6. After removal, automatically prunes orphan branches (no worktree, no unpushed commits)
1257
1256
 
1258
1257
  **Behavior Modes:**
1259
1258
 
@@ -1271,6 +1270,7 @@ The clean command:
1271
1270
  - By default, only removes worktrees with NO unpushed commits
1272
1271
  - Always prompts for confirmation before deletion
1273
1272
  - Main/bare repository, default branch, and gw_root worktrees are never removed
1273
+ - After removing worktrees, automatically prunes orphan branches (branches with no worktree and no unpushed commits)
1274
1274
  - Use `--force` to bypass safety checks (use with caution)
1275
1275
 
1276
1276
  **Configuration:**
@@ -1332,6 +1332,7 @@ By default, `gw remove` deletes the local branch after removing the worktree:
1332
1332
  - Use `--preserve-branch` to keep the local branch
1333
1333
  - Use `--force` to force delete unmerged branches
1334
1334
  - Protected branches (main, master, defaultBranch, gw_root) are never deleted
1335
+ - Also automatically prunes any other orphan branches (no worktree, no unpushed commits)
1335
1336
 
1336
1337
  **Protected Worktrees:**
1337
1338
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gw-tools/gw",
3
- "version": "0.37.0",
3
+ "version": "0.38.0-beta.36.2",
4
4
  "description": "A command-line tool for managing git worktrees - copy files between worktrees with ease",
5
5
  "keywords": [
6
6
  "git",