How to modify and submit stacked PRs with the GitHub CLI

GitHub demonstrates how to clean up and submit stacked pull requests using the GitHub CLI stacked PRs extension, including inspecting PR layers, folding redundant commits, renaming layers, and submitting PRs for sequential review and merge on GitHub.

Overview

When working with stacked PRs, each layer should be understandable and reviewable on its own. This video walks through using the GitHub CLI extension for stacked PRs to inspect a stack, reorganize layers, and then submit pull requests so they can be reviewed and merged sequentially.

What the video covers

Why clean up PR layers

Inspecting layers

Folding and renaming layers

Submitting stacked PRs

Reviewing and merging on GitHub

Automatic retargeting and merging to main