How-to guide

How to split a large pull request

When should I split a pull request, and where should the split go?

Split a pull request when its reviewer must make several independent decisions. Choose a first change that leaves main usable, has a clear purpose and carries its own evidence. Give the next change a separate review once its starting point is clear.

Find a boundary a reviewer can explain

Summarise the proposed change in a sentence. A description that combines a rename, a new rule and a user-interface change often hides three review decisions. A line count can prompt the discussion. It cannot tell you whether two files have to change together.

  1. List the behaviour changes, structural edits and generated updates. Identify which ones depend on each other.
  2. Pick a first slice that can build, run and be reverted on its own. Keep its tests with the implementation.
  3. Describe the next slice in the first pull request so reviewers can see the sequence. Check the state of main after each proposed merge.

Keep one change together when its evidence belongs together

A small bug fix and its failing regression case make one reviewable unit. Separating them can leave the main branch red or make the fix harder to evaluate. A mechanical rename that spans many references may also be easy to review on its own.

Worked example

Untangle a change to report downloads

A patch renames the export builder, adds column selection and redesigns the download menu. First land the rename with the existing output checks passing. Next add column selection behind the existing default and compare the exported headings. Finally connect the menu to the tested option. Each reviewer gets a distinct question and a working checkout.

Adapted by Cue April from The Engineering Handbook v1.0.0 by Tenhaw (© 2026 Tenhaw LTD). The examples and pull request checks are Cue April adaptations. Tenhaw on preparing changes for review · CC BY 4.0

Try it on your pull request

On your own PR, identify the behaviour that belongs to the first slice and check whether its tests could detect a mistake in that slice.

Try Cue April on your repository

Create an account, connect your repository and review the test plan.