Skip to content

Commit 93e1b7d

Browse files
committed
merge process clarification
1 parent 1d394c6 commit 93e1b7d

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

docs/src/content/docs/guides/stacked-prs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Each PR in a stack shows only the diff for its layer — the changes between its
2121
- **Review individual PRs** when you're focusing on a specific concern (e.g., reviewing only the API layer).
2222
- **Use the stack map** to navigate between PRs without going back to the PR list.
2323

24-
## Merging Step by Step
24+
## Merging from the Bottom Up
2525

26-
Stacks are merged **from the bottom up**. You cannot merge a PR in the middle of the stack before the PRs below it are merged.
26+
Stacks are merged **from the bottom up** — you can merge any number of PRs at once, as long as they form a contiguous group starting from the lowest unmerged PR. For example, in a stack of four PRs, you can merge just the bottom one, or the bottom three together, but you cannot merge only the second and third PRs while leaving the first unmerged. Mid-stack merges are not allowed.
2727

28-
1. When the bottom PR meets all merge requirements, merge it.
29-
2. After the bottom PR is merged, the remaining stack is **automatically rebased** — the next PR's base is updated to target `main` directly.
30-
3. The next PR is now at the bottom and can be reviewed, approved, and merged.
28+
1. When the lowest unmerged PR (and any PRs above it that you want to include) meet all merge requirements, merge them.
29+
2. After the merge, the remaining stack is **automatically rebased** — the next unmerged PR's base is updated to target `main` directly.
30+
3. The next unmerged PR is now at the bottom and can be reviewed, approved, and merged.
3131
4. Repeat until the entire stack is landed.
3232

3333
For details on merge methods (squash, merge commit, rebase) and merge requirements, see [Merging Stacks](/gh-stack/introduction/overview/#merging-stacks) in the Overview.

docs/src/content/docs/introduction/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ While the PR UI provides the review and merge experience, the `gh stack` CLI han
9494

9595
The CLI is not required to use Stacked PRs — the underlying git operations are standard. But it makes the workflow simpler, and you can create Stacked PRs from the CLI instead of the UI.
9696

97+
**Bring Your Own Tools:** You don't need to use the `gh stack` CLI for your local workflow. If you use tools like Jujutsu, Sapling, or custom tools to manage and push your local branches, you can then use the CLI or the GitHub UI to open a stack of PRs from those branches. See the [FAQ](/gh-stack/faq/#will-this-work-with-a-different-tool-for-stacking) for examples.
98+
9799
## Thinking About Stack Structure
98100

99101
Each branch in a stack should represent a **discrete, logical unit of work** that can be reviewed independently. Think of a stack from the reviewer's perspective: the PRs should tell a cohesive story, where each one is a small, logical piece of the whole.

0 commit comments

Comments
 (0)