You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* prune merged branches
* interactively prompt for prune
* delete remote tracking ref too
* disable selecting merged branches in TUIs
* include full list (including merged PRs) in PUT request to stacks API
* add prune to docs
* addressing review comments
* increment skill file version
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -310,15 +310,20 @@ Performs a safe, non-interactive synchronization of the entire stack:
310
310
3.**Cascade rebase** — rebases all stack branches onto their updated parents (only if trunk moved). If a conflict is detected, all branches are restored to their original state and you are advised to run `gh stack rebase` to resolve conflicts interactively
311
311
4.**Push** — pushes all branches (uses `--force-with-lease` if a rebase occurred)
312
312
5.**Sync PRs** — syncs PR state from GitHub and reports the status of each PR
313
+
6.**Prune** — in interactive terminals, prompts to delete local branches for merged PRs. Use `--prune` to prune automatically
313
314
314
315
| Flag | Description |
315
316
|------|-------------|
316
317
|`--remote <name>`| Remote to fetch from and push to (defaults to auto-detected remote) |
318
+
|`--prune`| Delete local branches for merged PRs |
317
319
318
320
**Examples:**
319
321
320
322
```sh
321
323
gh stack sync
324
+
325
+
# Sync and automatically prune merged branches
326
+
gh stack sync --prune
322
327
```
323
328
324
329
### `gh stack push`
@@ -556,6 +561,7 @@ gh stack push
556
561
557
562
# 8. When the first PR is merged, sync the stack
558
563
gh stack sync
564
+
# → prompts to prune merged branches (or use --prune to prune automatically and avoid the prompt)
0 commit comments