Lesstep
Bitbucket · splitting a pull request · Checked November 10, 2026

Split a large Bitbucket pull request into smaller ones

A pull request with too much in it is slow to review, and on Bitbucket Cloud it can reach hard limits: the web page stops drawing diffs past 2,000 changed lines or 100 KB per file, or 200 files or 8,000 lines per pull request (the diff limits), and a pull request takes 200 comments at most (the comment limit). Atlassian's knowledge base suggests moving groups of commits to new branches with git cherry-pick, one smaller pull request each (Split a large pull request into multiple smaller ones). Below is that way, two others, and how to shrink the large pull request after each part merges.

By commits (Atlassian's way)

git checkout main
git checkout -b feature/one-part
git cherry-pick <commit 1> <commit 2>
git push -u origin feature/one-part

Then create a pull request from feature/one-part into main and ask the reviewers to look at that one only. git log --oneline main..feature/big lists the large branch's commits to choose from. This works when each commit is about one thing; a commit that mixes two cannot be split this way, so copy files instead.

To do it from the IDE: Pull Request Inbox for Bitbucket, a plugin for JetBrains IDEs, creates each part's pull request into the branch you pick, and shows a large pull request's full diff in the IDE.

By files

git checkout -b feature/one-part main
git checkout feature/big -- src/billing/
git commit -m "Billing changes from feature/big"
git push -u origin feature/one-part

git checkout with a branch and paths copies those files as they are on the large branch, ready to commit. It does not delete files that the large branch deleted; remove those with git rm. Pick paths that build and work on their own.

Stacked: one pull request onto another's branch

A Bitbucket pull request can merge into any branch, not only main. Create the second part's pull request from feature/part-two into feature/part-one: its diff shows part two only, and the reviewers can read both parts at once. Before you merge the first with Close source branch, change the second's destination to main with Edit (changing the destination branch), so that it does not point at a branch that is gone.

After each part merges

The large pull request keeps listing the changes of a part that has merged, because Bitbucket compares it from the commit where it left main (the merge base). Bring main in:

git checkout feature/big
git merge main
git push

Its diff then drops what main already has (changes already in the destination branch). The same goes for a stacked second part after the first was squash merged. Repeat until little or nothing is left in the large pull request, and decline it if nothing is.

Bitbucket pull requests in IntelliJ IDEA

Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pull requests that wait for your review in an IDE tool window. Its Create Bitbucket Pull Request… has an Into branch field that picks from the branches on the server, so a stacked part can go into the first part's branch. It reads each changed file whole and compares the two versions in the IDE's diff viewer, so a large pull request shows its full diff, for up to 3,000 changed files. The review inbox, diffs, discussions and merge checks are free; creating, approving, commenting and merging are Pro, with a 30-day trial. It also works with Bitbucket Data Center (beta).

Get it on JetBrains Marketplace

Bitbucket and Atlassian are trademarks of Atlassian; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by Atlassian or JetBrains.

More: "The diff for this file is too large to render" · 200 comments per pull request · Change the destination branch · Changes already in the destination branch · 日本語