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

Add an option to squash an entire stack into one commit

Open rll-thg opened this issue 2 months ago • 1 comments

When merging a stack with squash enabled, each PR is currently squashed into its own commit.

Please add an option, such as a Squash entire stack button or action, that combines all changes in the stack into a single commit on the target branch. This would be useful when the stack was only needed for incremental review, but the merged result should have a single commit.

rll-thg avatar Sep 28 '26 09:09 rll-thg

+1 to this. I hit the same limit on a stack of 8 PRs. My org wants one commit per ticket, so I had to unstack the PRs and merge them top-down by hand before merging the combined branch into develop.

The alternative is a separate integration branch that the stack targets. But that branch then needs its own review of work that has already been reviewed, which brings back the large, hard-to-review PR that stacking is meant to avoid.

Native squash-merge support for a whole stack would remove that workaround.

jakubdolejs avatar Oct 16 '26 19:10 jakubdolejs