git-worktrees 0.10.0__tar.gz → 0.11.1__tar.gz
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.
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/AGENTS.md +79 -25
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/CHANGELOG.md +88 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/PKG-INFO +76 -48
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/README.md +75 -47
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/completions/gw.fish +6 -5
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/conf.d/worktrees.fish +1 -1
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/REFERENCE.md +57 -27
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/commands/branch-prune.md +8 -5
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/commands/branch-status.md +16 -10
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/commands/fast-forward.md +38 -10
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/.claude-plugin/plugin.json +2 -2
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/.codex-plugin/plugin.json +4 -4
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/README.md +30 -7
- git_worktrees-0.11.1/plugin/hooks/codex.json +16 -0
- git_worktrees-0.11.1/plugin/hooks/hooks.json +16 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/plugin.json +2 -2
- git_worktrees-0.11.1/plugin/session.md +32 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/fast-forward/SKILL.md +3 -2
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/preflight/rules.json +1 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/prune/SKILL.md +30 -25
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/ship-it/SKILL.md +52 -24
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/ship-it/rights.md +5 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/pyproject.toml +1 -1
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/branch_cli.py +17 -11
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/branches.py +91 -24
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/cli.py +232 -102
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/fast_forward.py +120 -14
- git_worktrees-0.11.1/src/worktrees/merged.py +469 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/new_branch.py +40 -10
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/prune.py +133 -31
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/render.py +1 -1
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/sync.py +10 -5
- git_worktrees-0.11.1/src/worktrees/verdicts.py +392 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/worktree.py +3 -5
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/conftest.py +7 -1
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_assessment.py +233 -41
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_branch_forge.py +22 -1
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_branches.py +7 -4
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_cli.py +155 -86
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_completions.py +60 -18
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_fast_forward.py +142 -16
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_forge.py +10 -9
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_gates.py +33 -38
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_new_branch.py +153 -2
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_partial_clone.py +11 -8
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_plugin.py +64 -25
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_removal.py +19 -22
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_sync.py +22 -13
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_worktree.py +40 -44
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/uv.lock +2 -2
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/completions/_gw +6 -5
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/worktrees.plugin.zsh +1 -1
- git_worktrees-0.10.0/plugin/skills/new-branch/SKILL.md +0 -51
- git_worktrees-0.10.0/src/worktrees/merged.py +0 -250
- git_worktrees-0.10.0/src/worktrees/verdicts.py +0 -279
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.claude/settings.json +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.codex/config.toml +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.github/workflows/codeql.yml +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.github/workflows/publish.yml +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.github/workflows/testpypi.yml +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.github/workflows/tests.yml +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.gitignore +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.pre-commit-config.yaml +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.python-version +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/.releasetools.yaml +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/LICENSE +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/Makefile +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/completions/worktrees.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/BENCHMARK.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/DEVELOPMENT.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/commands/ci-checks.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/commands/merge.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/docs/plans/2026-11-05-worktree-pruning-design.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gw.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwa.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwbc.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwbp.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwbs.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwff.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwl.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwm.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwp!.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwp.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwpa!.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwpa.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwr!.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gwr.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/functions/gws.fish +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/hatch_build.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/ci-checks/SKILL.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/describe-pr/SKILL.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/describe-pr/format.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/preflight/SKILL.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/plugin/skills/preflight/agents/openai.yaml +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/renovate.json +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/scripts/README.md +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/scripts/benchmark.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/scripts/bump_version.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/scripts/verify-publish.bash +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/__init__.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/branch_forge.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/ci.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/errors.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/forge.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/git.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/layout.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/pick.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/pr_merge.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/progress.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/src/worktrees/repo.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_benchmark.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_ci.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_command_defaults.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_fixture.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_git_records.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_path_boundaries.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_pr_merge.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_render.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_shims.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_spec.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/tests/test_version.py +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gw +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwa +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwbc +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwbp +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwbs +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwff +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwl +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwm +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwp +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwp! +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwpa +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwpa! +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwr +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gwr! +0 -0
- {git_worktrees-0.10.0 → git_worktrees-0.11.1}/zsh/plugins/worktrees/functions/gws +0 -0
|
@@ -86,7 +86,11 @@ of the line alone, so no shortcut meets history expansion. `!!` would.
|
|
|
86
86
|
`gw branch create` and `gw fast-forward` start branches, not worktrees.
|
|
87
87
|
`gw branch create NAME` starts NAME off the head ref, as `origin new-branch`
|
|
88
88
|
does, and keeps argparse's 2 for a usage error where `origin` has a single
|
|
89
|
-
non-zero exit code.
|
|
89
|
+
non-zero exit code. On a terminal, standing on a branch other than the head
|
|
90
|
+
branch, it asks whether to stack NAME on that branch, and the sync it runs
|
|
91
|
+
first runs on a thread meanwhile: `_refresh` starts the spinner only once
|
|
92
|
+
the answer is in, so nothing draws over the question. `--here` starts NAME
|
|
93
|
+
from the commit this checkout is on and syncs nothing.
|
|
90
94
|
|
|
91
95
|
`gw fast-forward` starts a branch only when the one you stand on is proved
|
|
92
96
|
finished, by the same `merged.branch_proof` that `gw prune` reads, or when
|
|
@@ -123,11 +127,18 @@ ref or `--from`. Commits after the merged part are replayed onto it with
|
|
|
123
127
|
a time an earlier rotation put in front, and a name held here or on the
|
|
124
128
|
default remote is refused.
|
|
125
129
|
|
|
126
|
-
It
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
It fetches the default remote when a sync is due and asks the forge for
|
|
131
|
+
the branch's newest merged request in every run, never reading the cached
|
|
132
|
+
one, since a pull request merged a moment ago is the usual reason to run it.
|
|
133
|
+
A merge commit the forge names that the head ref lacks raises `_Behind`
|
|
134
|
+
before anything moves, and `fast_forward` fetches and decides once more.
|
|
135
|
+
A failed fetch or forge query is a refusal whose last line is the same
|
|
136
|
+
command under `WORKTREES_OFFLINE=1`.
|
|
137
|
+
|
|
138
|
+
A branch whose open request targets another branch with an open request,
|
|
139
|
+
a stacked one, is levelled with that branch instead of the head ref:
|
|
140
|
+
`fast_forward.stacked_on` reads both requests from the forge in the same
|
|
141
|
+
run, and the branch below levels with the head ref in its own run.
|
|
131
142
|
|
|
132
143
|
Every other branch keeps its name. One with no commits of its own
|
|
133
144
|
fast-forwards and one with commits is rebased, both with `--no-autostash`
|
|
@@ -179,6 +190,14 @@ A completion asks the CLI for its candidates rather than deriving them, and
|
|
|
179
190
|
by a tab, which fish reads directly and zsh splits for `_describe`. Hidden from
|
|
180
191
|
`--help`, because a person has `gw --help` and `--table` for the same answers.
|
|
181
192
|
|
|
193
|
+
Every TAB runs one, so `main()` answers the exact words the completion files
|
|
194
|
+
send before it builds a parser: `gw list`, `gw remove`, `gw branch`,
|
|
195
|
+
`gw branch status` and `gw branch prune`, each followed by `--complete`.
|
|
196
|
+
Building the argparse tree costs more than the answer, and on Python 3.14 a
|
|
197
|
+
parser imports `_colorize` as it is made. Any other words reach the parser,
|
|
198
|
+
so a typo still gets its usage error. The output is the same either way, and
|
|
199
|
+
`tests/test_completions.py` drives it through both shells.
|
|
200
|
+
|
|
182
201
|
No shell file holds a candidate or a rank. What `completions/gw.fish` and
|
|
183
202
|
`_gw` do carry is each subcommand's flags, and `tests/test_completions.py`
|
|
184
203
|
diffs those against `gw <command> --help` in both directions for both shells:
|
|
@@ -187,14 +206,13 @@ watching. A shortcut has no completion file of its own.
|
|
|
187
206
|
|
|
188
207
|
## The agent plugin reads `--json`
|
|
189
208
|
|
|
190
|
-
`plugin/` ships with the CLI:
|
|
209
|
+
`plugin/` ships with the CLI: six skills, each a directory under
|
|
191
210
|
`plugin/skills/` named as its command is, `/worktrees:<name>` in Claude Code
|
|
192
211
|
and `$worktrees:<name>` in Codex. Skills call `gw` from `$PATH`; nothing
|
|
193
212
|
assumes a plugin root or a checkout at a known path.
|
|
194
213
|
|
|
195
214
|
| skill | runs |
|
|
196
215
|
| --- | --- |
|
|
197
|
-
| `new-branch` | `gw sync`, then `gw branch create` |
|
|
198
216
|
| `fast-forward` | `gw fast-forward --autostash --json`, then each rebase conflict until the branch is level |
|
|
199
217
|
| `ci-checks` | `gw ci-checks --json`, `--wait` to wait without polling |
|
|
200
218
|
| `describe-pr` | checks a review's title and body against its diff, and edits them |
|
|
@@ -224,8 +242,8 @@ skill's commands to never writing `--force`, `--admin`, `--auto` or
|
|
|
224
242
|
`--delete-branch`.
|
|
225
243
|
|
|
226
244
|
The prune skill reads `gw prune --json` and
|
|
227
|
-
`gw branch status --json`, preserving head/sync state and full rows for eligible, empty
|
|
228
|
-
stash-blocked and ignored
|
|
245
|
+
`gw branch status --json`, preserving head/sync state and full rows for eligible, empty
|
|
246
|
+
and stash-blocked cases, and each worktree's ignored paths. `tests/test_plugin.py` extracts the
|
|
229
247
|
actual jq filters and applies them to real CLI output. Checked-out branches
|
|
230
248
|
are absent from the loose-branch list. Paths and restore commands must retain
|
|
231
249
|
exact quoting.
|
|
@@ -239,6 +257,14 @@ and explicit deletion categories. Each worktree goes through
|
|
|
239
257
|
branches through `command gw branch prune`. The plugin never targets its current checkout. It reports
|
|
240
258
|
partial checkout, branch and stash outcomes and actual restore commands.
|
|
241
259
|
|
|
260
|
+
Both clients hand each session `plugin/session.md` when it starts: a
|
|
261
|
+
`SessionStart` hook in `plugin/hooks/hooks.json` for Claude Code and
|
|
262
|
+
`plugin/hooks/codex.json`, which the Codex manifest names, wraps the file
|
|
263
|
+
in the `additionalContext` JSON with `jq`. The rules say how a session uses
|
|
264
|
+
its worktree, including the check it makes before editing: changes it did
|
|
265
|
+
not make, or another process's lock, mean another session works there.
|
|
266
|
+
Nothing locks a worktree for a session.
|
|
267
|
+
|
|
242
268
|
The plugin carries the release version in three manifests, and
|
|
243
269
|
`scripts/bump_version.py` stamps all three. `plugin/plugin.json` is the
|
|
244
270
|
portable manifest, the Claude one with only the fields Agent Plugins v1 names;
|
|
@@ -430,14 +456,14 @@ every local branch tip on eight threads. Every other command but
|
|
|
430
456
|
`gw version`, `gw list`, `gw ci-checks`, `gw merge`, `gw fast-forward`, help and
|
|
431
457
|
completion runs the same `sync.run` first when
|
|
432
458
|
`sync.due` says so: the default remote's refs time is null or at least
|
|
433
|
-
`WORKTREES_SYNC_TTL` seconds old,
|
|
459
|
+
`WORKTREES_SYNC_TTL` seconds old, 300 by default. The forge time is not read,
|
|
434
460
|
since a forge that keeps failing would sync before every command. Without a
|
|
435
461
|
default remote nothing syncs first, because sync records nothing there.
|
|
436
462
|
`gw list` reads only the worktree records, so it never syncs first and
|
|
437
463
|
prints no word about how fresh the evidence is; its `--json` takes `head`
|
|
438
|
-
and `lastSync` from the cache. `gw fast-forward` runs `sync.fetch`
|
|
439
|
-
|
|
440
|
-
time.
|
|
464
|
+
and `lastSync` from the cache. `gw fast-forward` runs `sync.fetch`
|
|
465
|
+
instead when one is due, which fetches the default remote and records the
|
|
466
|
+
refs time.
|
|
441
467
|
|
|
442
468
|
A failed sync before a command is a warning, and the command goes on with
|
|
443
469
|
the evidence it has; quiet and JSON hide the warning. A failed fetch before
|
|
@@ -486,7 +512,22 @@ cohorts in `repo.require_offline_git`. Lower reported vendor versions refuse;
|
|
|
486
512
|
full clones keep older Git compatibility. Offline proof uses read-only
|
|
487
513
|
patch-id input and creates no synthetic commits.
|
|
488
514
|
|
|
489
|
-
The per-worktree checks run on eight
|
|
515
|
+
The per-worktree checks run on a thread per core, eight at most. Each is a
|
|
516
|
+
git process whose work is the CPU's, so more threads than cores only queue
|
|
517
|
+
behind each other and the interpreter lock; `sync` keeps eight, since its
|
|
518
|
+
threads wait on the network. Mutations remain serial.
|
|
519
|
+
|
|
520
|
+
An assessment asks every worktree the same questions about the head, so
|
|
521
|
+
`merged.reuse()` keeps the answers that name objects by full SHA for the
|
|
522
|
+
length of one `assess`: a commit's tree, a merge base, the patch-ids of the
|
|
523
|
+
head's commits after a fork point. Those are facts about the objects. Nothing
|
|
524
|
+
outside an assessment keeps them, since `gw fast-forward` fetches and an
|
|
525
|
+
object missing a moment ago can appear, and a failed answer is never kept.
|
|
526
|
+
|
|
527
|
+
`git submodule status` is the costliest check, so the store decides alone
|
|
528
|
+
when it exists, and without one the check runs only where `.gitmodules`
|
|
529
|
+
exists. The store outlives a deleted `.gitmodules`, which is also when
|
|
530
|
+
`submodule status` itself fails with "no submodule mapping found".
|
|
490
531
|
|
|
491
532
|
`gw ci-checks` takes GitHub's review and checks from one `gh pr view` with
|
|
492
533
|
`statusCheckRollup` and `commits`. Commit messages and checks describe the
|
|
@@ -586,11 +627,20 @@ and asserts it.
|
|
|
586
627
|
## Verdicts and deletion are separate
|
|
587
628
|
|
|
588
629
|
`merged.branch_proof` checks matching cached forge proof, first-parent
|
|
589
|
-
membership, local completion proof,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
630
|
+
membership, local completion proof, absent evidence, the cached request's
|
|
631
|
+
state, then whether a remote-tracking ref holds the tip. It returns a reason:
|
|
632
|
+
`merged`, `unused`, `closed`, `open`, `pushed`, `unpushed` or `unknown`.
|
|
633
|
+
`gw fast-forward` reads it as it is; prune's assessments split `unused` by
|
|
634
|
+
the branch's reflog into `merged`, `unused` and `stale`, and put the
|
|
635
|
+
checkout facts first, `uncommitted` among them. A row's verdict is `remove`
|
|
636
|
+
for `merged` and `stale` and `keep` for every other reason. First-parent
|
|
637
|
+
history belongs to the assessed head, not a divergent local counterpart.
|
|
638
|
+
|
|
639
|
+
Removing a worktree deletes its HEAD reflog and deleting a branch its
|
|
640
|
+
reflog. `merged.reflog_only` lists the commits only those reach, by
|
|
641
|
+
`rev-list --not --all`, and keeps each whose own patch-id the head lacks;
|
|
642
|
+
they hold the row back until `--delete reflog`, which `--delete all`
|
|
643
|
+
includes and which is the one value `--keep-branch` takes.
|
|
594
644
|
|
|
595
645
|
Content proof compares changed paths, modes and deletions against the head.
|
|
596
646
|
It cannot settle a stacked branch whose intermediate content the head later
|
|
@@ -605,12 +655,16 @@ unmerged requests are never proof.
|
|
|
605
655
|
head branch are protected. Locked or dirty worktrees, untracked files,
|
|
606
656
|
initialized submodules and a submodule store left by `deinit` block removal;
|
|
607
657
|
`git worktree remove` refuses each. A locked worktree whose directory is away
|
|
608
|
-
is assessed from its record.
|
|
609
|
-
|
|
658
|
+
is assessed from its record. Empty branches and matching stashes require
|
|
659
|
+
their own permission; ignored paths go with the worktree, listed in the
|
|
660
|
+
disclosure first. `--yes` grants neither. A protection a value lifts ends
|
|
661
|
+
with every value its row needs, and only when those values make the row
|
|
662
|
+
eligible, so one hint followed alone frees it; the prune skill's jq reads
|
|
663
|
+
that wording, and `tests/test_plugin.py` runs it.
|
|
610
664
|
`gw prune` also protects the current worktree; `gw remove` needs a second terminal
|
|
611
665
|
confirmation for it. `--keep-branch` retains the branch and its stashes,
|
|
612
|
-
needs no completion proof for an attached checkout, and combines
|
|
613
|
-
`--delete
|
|
666
|
+
needs no completion proof for an attached checkout, and combines with no
|
|
667
|
+
`--delete` value.
|
|
614
668
|
|
|
615
669
|
The removal snapshot pins the branch and head SHAs, exact path, ignored
|
|
616
670
|
paths and stash identities. Recheck after confirmation precedes plain
|
|
@@ -618,7 +672,7 @@ worktree removal, full-SHA ref deletion and approved stash drops. Ignored
|
|
|
618
672
|
paths are what an ignore pattern names, so a matched directory is one entry;
|
|
619
673
|
the snapshot is a path listing, not a recursive content fingerprint, and a
|
|
620
674
|
file created inside a listed directory after assessment goes with it. The
|
|
621
|
-
disclosure
|
|
675
|
+
disclosure and the JSON `ignored` field list each
|
|
622
676
|
path as git does, from the top level, sorted, so a tracked directory above
|
|
623
677
|
an ignored one never reads as ignored. A path whose pattern, found with
|
|
624
678
|
`git check-ignore -v`, ends in a bare `*` or `**` reads as its directory,
|
|
@@ -17,6 +17,94 @@ not in here, whatever it cost to build.
|
|
|
17
17
|
A release closes with a `### Choices` section when a decision in it is worth
|
|
18
18
|
the reader's time: what was chosen, and what the alternative failed to do.
|
|
19
19
|
|
|
20
|
+
## 0.11.1 - 2026-11-15
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
`gw fast-forward` levels a branch stacked on another open pull request
|
|
25
|
+
with that branch, so a stack stays in order while its bottom is
|
|
26
|
+
reviewed. `/worktrees:ship-it` ships named branches that build on each
|
|
27
|
+
other as a stack: it opens each pull request on the one below with
|
|
28
|
+
`gh stack link --open`, which needs the `gh-stack` extension, and merges
|
|
29
|
+
bottom first. Add `Bash(gh stack link *)` to Claude Code's permissions,
|
|
30
|
+
or rerun `/worktrees:preflight`.
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
`WORKTREES_SYNC_TTL` defaults to 5 minutes, and `gw fast-forward` keeps
|
|
35
|
+
to it: it fetches once the last fetch is that old, or when the forge
|
|
36
|
+
reports a merge the fetched head branch does not hold yet.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
`gw prune` and `gw remove` keep a worktree whose submodule was initialized
|
|
41
|
+
before its `.gitmodules` was deleted, with reason `submodule`. They stopped
|
|
42
|
+
at exit 1 with "no submodule mapping found".
|
|
43
|
+
|
|
44
|
+
## 0.11.0 - 2026-11-14
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
`gw prune`, `gw remove` and `gw branch status` give each row a verdict of
|
|
49
|
+
`remove` or `keep` and a reason naming the fact that decides it, such as
|
|
50
|
+
`merged`, `uncommitted`, `closed`, `unpushed` or `in-progress`, in a new
|
|
51
|
+
REASON column and as `reason` and `needs` in the JSON. Scripts that read
|
|
52
|
+
the `empty` or `unknown` verdicts, or pass `--only empty` or
|
|
53
|
+
`--only unknown`, must read `reason` instead; `--only` takes `remove` or
|
|
54
|
+
`keep`.
|
|
55
|
+
|
|
56
|
+
A worktree with uncommitted changes or untracked files reads `keep`. A
|
|
57
|
+
branch whose own commits went into the head branch by fast-forward reads
|
|
58
|
+
`merged`, and one with nothing of its own and no reflog left reads `stale`;
|
|
59
|
+
both are removed without `--delete empty`. Removal holds back a row whose
|
|
60
|
+
deleted reflogs hold a commit the head branch lacks, printing `git show`
|
|
61
|
+
for each, until `--delete reflog`. A branch whose pull request closed
|
|
62
|
+
without merging is kept until `--delete closed`.
|
|
63
|
+
|
|
64
|
+
A `pass --delete` hint appears only where those values free the row, and
|
|
65
|
+
the `--yes` command a preview prints keeps the flags that made the row
|
|
66
|
+
eligible; following either used to leave the row where it was. The
|
|
67
|
+
confirmation lists each worktree, ignored path, reflog commit, branch and
|
|
68
|
+
stash it deletes, and asks with their counts.
|
|
69
|
+
|
|
70
|
+
`gw prune` and `gw remove` delete a worktree's ignored files without a
|
|
71
|
+
permission, listing each ignored path before the confirmation. Drop
|
|
72
|
+
`--delete ignored-files` from scripts: it is now a usage error, and
|
|
73
|
+
`--keep-branch` takes no `--delete` value.
|
|
74
|
+
|
|
75
|
+
### Removed
|
|
76
|
+
|
|
77
|
+
The agent plugin's `new-branch` skill is removed; agents start branches
|
|
78
|
+
with `gw branch create` or `git switch --create`.
|
|
79
|
+
|
|
80
|
+
### Added
|
|
81
|
+
|
|
82
|
+
`gw branch create NAME`, on a terminal and standing on a branch other
|
|
83
|
+
than the head branch, asks whether to stack NAME on that branch while
|
|
84
|
+
its sync runs. `--here` starts NAME from the commit this checkout is
|
|
85
|
+
on without syncing.
|
|
86
|
+
|
|
87
|
+
The agent plugin hands each Claude Code and Codex session the rules for
|
|
88
|
+
how it uses its worktree, through a SessionStart hook that needs `jq`.
|
|
89
|
+
Before editing, a session checks whether another one works in its
|
|
90
|
+
worktree, from uncommitted changes it did not make or another process's
|
|
91
|
+
lock, and moves to a worktree of its own when one does. The rules say to
|
|
92
|
+
ship a change the user decided on once its checks pass, through
|
|
93
|
+
`/worktrees:ship-it`, without being asked, merge included.
|
|
94
|
+
|
|
95
|
+
### Fixed
|
|
96
|
+
|
|
97
|
+
`gw add`, `gw branch create` and `gw fast-forward NAME` refuse a branch
|
|
98
|
+
name that nests with an existing branch, such as `codex` beside
|
|
99
|
+
`codex/plan`, and name the branch in the way. Git's own refusal named
|
|
100
|
+
refs and lock files, and `gw add` left an empty directory behind.
|
|
101
|
+
|
|
102
|
+
`/worktrees:ship-it BRANCH ...` ships each named branch from the
|
|
103
|
+
worktree you run it in, switching to each in turn, and creates no
|
|
104
|
+
worktree. A branch checked out in another worktree is reported and
|
|
105
|
+
left alone. In the main checkout, ship-it switches back to the head
|
|
106
|
+
branch after each push.
|
|
107
|
+
|
|
20
108
|
## 0.10.0 - 2026-11-13
|
|
21
109
|
|
|
22
110
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: git-worktrees
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.1
|
|
4
4
|
Summary: Git worktree commands that refuse to lose work.
|
|
5
5
|
Project-URL: Bug reports, https://github.com/MihaiBojin/worktrees/issues/new
|
|
6
6
|
Project-URL: Source, https://github.com/MihaiBojin/worktrees
|
|
@@ -58,7 +58,7 @@ repositories under the same worktree root are outside their scope.
|
|
|
58
58
|
| `gw branch status [NAME ...]` | `gwbs` | assess local branches without worktrees |
|
|
59
59
|
| `gw branch prune [NAME ...]` | `gwbp` | confirm and delete eligible loose branches |
|
|
60
60
|
| `gw add NAME [BASE]` | `gwa` | create or enter a worktree |
|
|
61
|
-
| `gw branch create NAME` | `gwbc` | start a branch from the
|
|
61
|
+
| `gw branch create NAME` | `gwbc` | start a branch from the head ref, or stack it on this branch |
|
|
62
62
|
| `gw fast-forward [NAME]` | `gwff` | rebase this branch onto the head ref, or move a merged one, and what came after its merge, to a new branch |
|
|
63
63
|
| `gw merge NUMBER --match-head-commit SHA` | | squash one checked GitHub PR, respecting native stacks and merge queues |
|
|
64
64
|
| `gw ci-checks [NUMBER]` | | read a pull request's checks from GitHub or GitLab; `gw ci` for short |
|
|
@@ -104,7 +104,7 @@ the plugin's tag to the same release, as each manager below describes.
|
|
|
104
104
|
### fish
|
|
105
105
|
|
|
106
106
|
```console
|
|
107
|
-
fisher install MihaiBojin/worktrees@v0.
|
|
107
|
+
fisher install MihaiBojin/worktrees@v0.11.1
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
Fisher copies `functions/`, `completions/` and `conf.d/` from the repository
|
|
@@ -121,7 +121,7 @@ the untagged one holds the files.
|
|
|
121
121
|
Antidote takes a `path:` into the repository, and `branch:` takes a tag:
|
|
122
122
|
|
|
123
123
|
```
|
|
124
|
-
MihaiBojin/worktrees branch:v0.
|
|
124
|
+
MihaiBojin/worktrees branch:v0.11.1 path:zsh/plugins/worktrees # in zsh_plugins.txt
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
The plugin puts its own `functions/` and `completions/` on `fpath` and
|
|
@@ -196,8 +196,8 @@ its stdout stays the version alone for a script to read.
|
|
|
196
196
|
An excerpt of `gw --help`'s release lines with matching CLI and shell releases:
|
|
197
197
|
|
|
198
198
|
```console
|
|
199
|
-
worktrees 0.
|
|
200
|
-
The shell plugin here is 0.
|
|
199
|
+
worktrees 0.11.1: git worktree commands that refuse to lose work
|
|
200
|
+
The shell plugin here is 0.11.1, the same release as these commands.
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
A shell without the variable has no plugin loaded, or one older than the
|
|
@@ -246,20 +246,38 @@ A checked-out branch appears only as its worktree, never as a loose branch.
|
|
|
246
246
|
[Branch status](docs/commands/branch-status.md) describes the proofs;
|
|
247
247
|
[branch prune](docs/commands/branch-prune.md) covers selection and recovery.
|
|
248
248
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
|
253
|
-
|
|
|
254
|
-
| `
|
|
255
|
-
|
|
256
|
-
`
|
|
257
|
-
|
|
258
|
-
`
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
249
|
+
A row's verdict is `remove` or `keep`, and its `reason` names the fact that
|
|
250
|
+
decides it, the first in this table that applies:
|
|
251
|
+
|
|
252
|
+
| Reason | Verdict | When |
|
|
253
|
+
| --- | --- | --- |
|
|
254
|
+
| `main-checkout` | `keep` | it is the main checkout |
|
|
255
|
+
| `current` | `keep` | `gw prune` runs inside it |
|
|
256
|
+
| `locked` | `keep` | the worktree is locked |
|
|
257
|
+
| `missing` | `keep` | its directory is gone and its record locked |
|
|
258
|
+
| `submodule` | `keep` | it has an initialized submodule or a submodule store |
|
|
259
|
+
| `in-progress` | `keep` | a rebase, merge, cherry-pick, revert or bisect waits in it |
|
|
260
|
+
| `uncommitted` | `keep` | it has uncommitted changes or untracked files |
|
|
261
|
+
| `protected` | `keep` | its branch is `main`, `master` or the head branch |
|
|
262
|
+
| `merged` | `remove` | a matching cached merged request, local ancestry, squash or content proof, or commits made on the branch that now sit on the head ref's first-parent history |
|
|
263
|
+
| `closed` | `keep` | a request closed unmerged at this tip; `--delete closed` removes it |
|
|
264
|
+
| `open` | `keep` | a request open at this tip |
|
|
265
|
+
| `unused` | `keep` | the tip is on the head ref's first-parent history and its reflog records no commit made on it; `--delete empty` removes it |
|
|
266
|
+
| `stale` | `remove` | the same, with no reflog left to say whether it was used |
|
|
267
|
+
| `pushed` | `keep` | commits outside the head that a remote-tracking ref holds |
|
|
268
|
+
| `unpushed` | `keep` | commits outside the head that only this repository holds |
|
|
269
|
+
| `unknown` | `keep` | the CLI lacks valid evidence |
|
|
270
|
+
|
|
271
|
+
Deleting a branch deletes its reflog, and removing a worktree deletes the
|
|
272
|
+
worktree's own. A commit nothing else reaches goes with them, so a row whose
|
|
273
|
+
deleted reflogs hold a commit whose patch the head lacks is held back, and
|
|
274
|
+
the protection names `git show SHA` for each one. `eligible` also checks
|
|
275
|
+
protections and the deletion permissions you supplied. The WHY column gives
|
|
276
|
+
the evidence, then each protection that stands. A protection that `--delete`
|
|
277
|
+
values lift ends with every value its row needs, such as
|
|
278
|
+
`pass --delete empty --delete stashes`, and only where those values make
|
|
279
|
+
the row eligible. For a target it keeps, `gw remove` prints every reason, and
|
|
280
|
+
names a command with `--keep-branch` when only that removes the worktree.
|
|
263
281
|
|
|
264
282
|
The CLI never deletes `main`, `master` or the head branch. It never removes
|
|
265
283
|
the main checkout, locked or dirty worktrees, worktrees with untracked files,
|
|
@@ -277,38 +295,44 @@ Repeat `--delete` to combine categories:
|
|
|
277
295
|
|
|
278
296
|
| Value | `gw prune`, `gw remove` | `gw branch prune` |
|
|
279
297
|
| --- | --- | --- |
|
|
280
|
-
| `empty` | permit an
|
|
281
|
-
| `ignored-files` | permit the worktree's ignored paths | usage error |
|
|
298
|
+
| `empty` | permit an `unused` branch and its worktree | permit an `unused` branch |
|
|
282
299
|
| `stashes` | permit the branch's stashes | same |
|
|
283
|
-
| `
|
|
300
|
+
| `closed` | permit a branch whose request closed unmerged at its tip | same |
|
|
301
|
+
| `reflog` | permit dropping commits only the deleted reflogs hold | same |
|
|
302
|
+
| `all` | every value above | same |
|
|
284
303
|
|
|
285
304
|
`gw branch status` rejects `--delete`. An unknown or unsupported value is a
|
|
286
|
-
usage error before mutation. `--delete
|
|
287
|
-
verdict.
|
|
288
|
-
contents. When only missing values hold worktrees back, `gw prune` names
|
|
305
|
+
usage error before mutation. A `--delete` value changes eligibility, not the
|
|
306
|
+
verdict. When only missing values hold worktrees back, `gw prune` names
|
|
289
307
|
the command that grants them, keeping the values you passed:
|
|
290
|
-
`gw prune --delete
|
|
308
|
+
`gw prune --delete empty makes fix-parser eligible`. Without a terminal,
|
|
309
|
+
the line that names `--yes` carries the `--delete` values and
|
|
310
|
+
`--keep-branch` you passed, so running it removes what was counted.
|
|
291
311
|
|
|
292
312
|
```console
|
|
293
|
-
gw prune --delete empty --delete
|
|
313
|
+
gw prune --delete empty --delete stashes
|
|
294
314
|
gw remove old-checkout --keep-branch
|
|
295
|
-
gw remove old-checkout --keep-branch --delete ignored-files
|
|
296
315
|
```
|
|
297
316
|
|
|
298
317
|
`--keep-branch` removes an otherwise unprotected checkout without completion
|
|
299
318
|
proof and retains its branch and stashes, including a protected branch.
|
|
300
319
|
A detached checkout has no branch to keep its commits, so it still needs
|
|
301
|
-
proof.
|
|
302
|
-
|
|
303
|
-
with it; `empty`, `stashes` and `all` are usage errors with `--keep-branch`.
|
|
320
|
+
proof. It keeps the branch's reflog but not the worktree's, so it takes
|
|
321
|
+
`--delete reflog`, and every other `--delete` value is a usage error with it.
|
|
304
322
|
|
|
305
323
|
### Removal and recovery
|
|
306
324
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
325
|
+
Removal deletes a worktree's ignored files: build output, caches and
|
|
326
|
+
virtual environments are what most of them are. They have no recovery
|
|
327
|
+
command, since Git never recorded their contents. Before confirmation, the
|
|
328
|
+
CLI discloses each thing it deletes or keeps, one line each, led by what
|
|
329
|
+
happens to it: `delete worktree` with its path, `delete ignored` for each
|
|
330
|
+
ignored path, sorted by name, `delete branch` and `delete stash` with their
|
|
331
|
+
restore commands, or `keep branch` under `--keep-branch`. The question
|
|
332
|
+
counts each kind: `delete 1 worktree, 1 ignored path and 1 branch? [y/N]`.
|
|
333
|
+
Each ignored path reads as the pattern that ignores it names it, from the
|
|
334
|
+
top level, with a trailing `/` on a directory: `__pycache__` lists
|
|
335
|
+
`src/pkg/__pycache__/`, never the tracked
|
|
312
336
|
`src/` above it. A pattern for a directory's contents, such as
|
|
313
337
|
`path/to/ignored/*`, lists that directory once as `path/to/ignored/`.
|
|
314
338
|
Below the list, `git -C PATH ls-files --others --ignored --exclude-standard`
|
|
@@ -353,10 +377,9 @@ JSON carries it in `path` and `outcome.destination`.
|
|
|
353
377
|
| `gwpa!` | `gw prune --delete all --yes` |
|
|
354
378
|
| `gwr!` | `gw remove --yes` |
|
|
355
379
|
|
|
356
|
-
`gwpa` permits deleting empty branches
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
`gw remove --delete ignored-files`.
|
|
380
|
+
`gwpa` permits deleting empty branches and branch stashes, and still asks
|
|
381
|
+
at a terminal. `gwpa!` and `gwr!` skip that question, as `gwp!` does.
|
|
382
|
+
`gwr!` grants no deletion category.
|
|
360
383
|
|
|
361
384
|
## Head and synchronization
|
|
362
385
|
|
|
@@ -402,7 +425,7 @@ A moved branch needs another sync for forge evidence; local proof still works.
|
|
|
402
425
|
|
|
403
426
|
Every command except `gw sync`, `gw version`, `gw list`, `gw fast-forward`,
|
|
404
427
|
help and completion syncs first when the default remote's refs have never
|
|
405
|
-
synced or last synced
|
|
428
|
+
synced or last synced 5 minutes ago or more. `WORKTREES_SYNC_TTL` sets that window in whole seconds, and `0`
|
|
406
429
|
syncs before every command. The forge time does not count, so a forge that
|
|
407
430
|
keeps failing does not make every command sync. A failed sync warns, `-q` and
|
|
408
431
|
`--json` hide the warning, and the command goes on with the evidence it had.
|
|
@@ -546,8 +569,8 @@ parseable. Passing both is a usage error.
|
|
|
546
569
|
| `gw merge` | no | yes |
|
|
547
570
|
|
|
548
571
|
Other commands retain their own flags; use `--help`. Help, version and
|
|
549
|
-
completion work without an assessment. `--only` filters assessment verdicts
|
|
550
|
-
and can be repeated
|
|
572
|
+
completion work without an assessment. `--only` filters assessment verdicts,
|
|
573
|
+
`remove` or `keep`, and can be repeated.
|
|
551
574
|
|
|
552
575
|
Every JSON result is an object with `lastSync` and `head`:
|
|
553
576
|
|
|
@@ -582,14 +605,14 @@ gw list --json | jq -r '.worktrees[].path'
|
|
|
582
605
|
| `gwp --dry-run` | `gw prune --json` or `gw prune --table` |
|
|
583
606
|
| `gw list --list`, `gw list -l`, `gw prune --list` | `gw list --table`, `gw prune --table` |
|
|
584
607
|
| `gwp --branch NAME` | `gw remove NAME` or a quoted exact path |
|
|
585
|
-
| `--delete-ignored
|
|
608
|
+
| `--delete-ignored`, `--delete ignored-files` | none; removal deletes ignored files and lists them first |
|
|
586
609
|
| `gwr --force`, `gwr -f` | `gw remove --keep-branch` |
|
|
587
610
|
| `--no-fetch`, `--no-forge`, `--force-refresh`, refresh `-f` | `WORKTREES_OFFLINE=1` to stay offline; `gw sync` to refresh now |
|
|
588
611
|
| `gw ls`, `gw NAME` | `gw list`, `gw list NAME` |
|
|
589
612
|
| `gwh`, `gw help`, `gw h` | `gw --help` or `gw -h` |
|
|
590
613
|
| a `--json` listing as an array, `.[]` | `gw list --json` object, `.worktrees[]` |
|
|
591
614
|
|
|
592
|
-
`
|
|
615
|
+
An `unused` or `closed` row requires explicit permission. `main` and `master` always remain
|
|
593
616
|
protected. Update scripts that assume a `remove` verdict alone permits
|
|
594
617
|
deletion to check `eligible` too.
|
|
595
618
|
|
|
@@ -609,14 +632,19 @@ an update-ref delete that names no full sha
|
|
|
609
632
|
|
|
610
633
|
## Agent plugin
|
|
611
634
|
|
|
612
|
-
[The agent plugin](plugin/README.md) gives Claude Code and Codex
|
|
613
|
-
over these commands:
|
|
635
|
+
[The agent plugin](plugin/README.md) gives Claude Code and Codex six skills
|
|
636
|
+
over these commands: bring a branch level with the head
|
|
614
637
|
branch through its rebase conflicts, read CI, keep a pull request's
|
|
615
638
|
description true to its diff, ship a change or an open pull request
|
|
616
639
|
through CI to its merge, prune finished worktrees and branches after
|
|
617
640
|
asking, and add the permission rules shipping needs to Claude Code's
|
|
618
641
|
settings.
|
|
619
642
|
|
|
643
|
+
The skills handle branches, pull requests and merges in the checkout the
|
|
644
|
+
session runs in, and never create a worktree. Creating and choosing
|
|
645
|
+
worktrees is for a person, through `gw add` and `gw list`, or for the
|
|
646
|
+
agent's client, as `claude --worktree` and `codex --worktree` do.
|
|
647
|
+
|
|
620
648
|
## Contributing
|
|
621
649
|
|
|
622
650
|
See [DEVELOPMENT.md](docs/DEVELOPMENT.md) for checks and release commands,
|