Stacked pull requests

Updated Oct 17, 2026

The github-stacks skill covers GitHub's native stacked pull requests through the gh stack extension. Install it with gh extension install github/gh-stack; it requires GitHub CLI 2.90.0 or later, Git 2.20 or later, and stacked pull requests enabled for the repository. The core workflow is gh stack init, gh stack add, gh stack submit, then gh stack sync as the stack changes.

For automation, use non-interactive flags such as --auto and --yes because some commands require a TTY, inspect state with gh stack view --json, and use gh stack push instead of force-pushing stack branches manually. See the detailed skill and CLI reference.

The following sequence diagram shows how a publication owner establishes and verifies the remote and GitHub receipts for a stack candidate before another managed write:

RemoteGitHubCandidateOwnerRemoteGitHubCandidateOwnerEstablish replay evidenceRun candidate-bound gatesgit ls-remoteEXPECTED_REMOTE_HEADgit push --no-follow-tags --force-with-lease="refs/heads/$BRANCH:$EXPECTED_REMOTE_HEAD" "$REMOTE" "$CANDIDATE:refs/heads/$BRANCH"Push resultgit ls-remotePublished CANDIDATE SHARead headRefOid and basePublication receiptReconcile tracking before next managed write