Split a large Pull Request into multiple smaller ones

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Sometimes a pull request can get quite large, be it by the amount of files added or commits containing too much code to be reviewed, and it's useful to have a way to split it into smaller tasks for your reviewers so that they can focus on specific portions of it or work on it simultaneously, with each reviewer taking care of one of the smaller tasks. This article explores a way to split that large Pull Request into multiple smaller ones using git cherry-pick for the process below:

Infographic of process of a large pull request.

Environment

Any repository that contains a pull request that has been deemed too large to review, be it because it has too many files, conflicts, or code, or for any other reason, it might be helpful to split it into smaller tasks.

Solution

To break out a PR in several smaller ones, follow the steps below:

  1. First we want to checkout to the main branch by using the command below:

    1 git checkout <branch name>
  2. Create a new branch that will be the destination for the new, smaller PR:

    1 git checkout -b <new_branch>
  3. Use git cherry-pick to separate a subset of commits (eg. regarding some refactoring):

    1 git cherry-pick <commit_id_1> <commit_id_2>
  4. Create a Pull request

  5. Instruct your reviewers to focus solely on this PR.

  6. After this is merged, update base Pull Requests. There’s less code to check now.

  7. Repeat 2-5 until there’s minimal code on the base pull request (or no code at all).

Updated on March 5, 2025

Still need help?

The Atlassian Community is here for you.