gh-stack icon indicating copy to clipboard operation
gh-stack copied to clipboard

[bug] local branch not deleted on restack

Open vineus opened this issue 7 months ago • 2 comments

When a down PR has been merged, the local branch is not deleted during sync when restacking:

Image

(skipped but the local branch still exist)

vineus avatar Apr 14 '26 08:04 vineus

This is intentional. We always want explicit user consent when deleting anything, just in case someone did want to keep a branch for some other reason.

Perhaps auto-deleting merged branches can be enabled by passing in a --prune flag to the relevant commands (sync and rebase)?

skarim avatar Apr 16 '26 18:04 skarim

Completed in https://github.com/github/gh-stack/pull/94

You can now use gh stack sync --prune to delete merged branches.

skarim avatar May 15 '26 18:05 skarim