GitLab merge request changes not shown: collapsed and too-large diffs
Short answer
GitLab collapses a file in a merge request's Changes tab once its diff reaches 10% of the instance's diff limits, and stops showing it as too large past those limits. On GitLab.com the limits are 200 KB of diff per file, 3,000 files and 100,000 lines, and can't be changed; GitLab Self-Managed defaults to 200 KB, 1,000 files and 50,000 lines, which an administrator can raise. Expand a collapsed file in place. For a too-large one, download the merge request's plain diff or patch, or fetch its head ref and run git diff locally. Lock files, minified files and other generated files are collapsed by default, which .gitattributes controls.
You open a merge request’s Changes tab, and a file shows a message instead of its diff, or GitLab says only the first files are listed, or “Some changes are not shown.” Nothing is lost: GitLab limits how much of a diff it draws, to keep the page fast. Here are the limits in GitLab 19.5, what each message means, and how to see every change anyway.
Collapsed, too large, or not shown
GitLab measures the size of each file’s diff, the number of changed files, the number of changed lines, and the total size of all the diffs together.
- Collapsed: at 10% of a limit, such as a file diff of 20 KB with the default 200 KB limit. Expand it to see the changes.
- Too large: past a limit, such as a single file diff over 200 KB. You can’t expand it in GitLab.
- Left out: past the limits on changed files, lines or total size, GitLab stops listing the remaining files.
When files are left out, GitLab says “Only the first N files are listed on this page” and “To view all changes, download the diff.”, with Plain diff and Patches buttons. In the classic view, collapsed files also bring an alert, “Some changes are not shown”, with Expand all files. For files you can’t expand, download the diff, below.
These limits apply to the API too, so tools that read diffs through it, such as IDE plugins and phone apps, get the same collapsed and too-large files.
The limits
| Limit | GitLab.com | GitLab Self-Managed default | Highest an administrator can set |
|---|---|---|---|
| Diff size per file | 200 KB | 200 KB | 500 KB |
| Changed files | 3,000 | 1,000 | 3,000 |
| Changed lines | 100,000 | 50,000 | 100,000 |
On GitLab.com you can’t change them. On GitLab Self-Managed and GitLab Dedicated, an administrator sets them in Admin › Settings › General › Diff limits. GitLab warns that higher limits use more resources and can make the instance unstable.
Two more limits stop a merge request from updating at all: 1,000 diff versions and 1,000,000 diff commits per merge request. Pushes to the branch still work, but the merge request no longer shows them, and GitLab says it “cannot be updated further”. Close it and open a new one.
What GitLab says
Since GitLab 19.4, the Changes tab uses Rapid Diffs by default, a faster beta view. The classic view, which you can switch back to, words some messages differently.
| Rapid Diffs | Classic view | What it means |
|---|---|---|
| Preview size limit exceeded, changes collapsed. | Files with large changes are collapsed by default. | Collapsed: expand it to see the diff. |
| File size exceeds preview limit. | Changes are too large to be shown. | Too large: download the diff, below. |
Generated files are collapsed by default. To change this behavior, edit the .gitattributes file. |
The same. | A generated file, such as a lock file: see generated files. |
Preview suppressed by a .gitattributes entry or the file’s encoding is unsupported. |
File suppressed by a .gitattributes entry, the file’s encoding is unsupported, or the file size exceeds the limit. |
.gitattributes marks the file as not to be diffed, or its encoding can’t be shown. |
| Contains only whitespace changes. | The same. | Nothing but whitespace changed. |
In Rapid Diffs, a file kept in Git LFS shows “File stored in LFS.”: there’s no text diff to preview.
See every change anyway
-
Download the changes. On the merge request, select Code › Plain diff for a
.difffile, or Code › Patches for a patch you can apply withgit am. You can also add.diffor.patchto the merge request’s URL:curl -O "https://gitlab.com/group/project/-/merge_requests/123.diff"For a private project, download it from the browser, where you’re signed in.
-
Compare locally. Every open merge request has a head ref, so you can fetch it even from a fork. GitLab deletes it 14 days after the merge request is merged or closed.
git fetch origin merge-requests/123/head:mr-123 git diff origin/main...mr-123 -- path/to/big-file.jsonThe three dots compare against the point where the merge request branched off, which is close to what GitLab shows.
-
Split the merge request. If reviewers regularly can’t see the changes, the merge request is probably too big to review well. Smaller merge requests stay under the limits, and get read.
Generated files
GitLab collapses generated files by default, because they rarely need review:
- files with
.nib,.xcworkspacedataor.xcuserstateextensions; - package lock files, such as
package-lock.jsonandGopkg.lock; - anything in a
node_modulesfolder; - minified JavaScript and CSS, and source maps;
- generated Go files, including protocol buffer output.
Change that with the gitlab-generated attribute in .gitattributes, at the root of the repository:
# Collapse everything under docs/generated
docs/generated/** gitlab-generated
# Always show package-lock.json
package-lock.json -gitlab-generated
The change takes effect once it’s merged into the default branch.
On your phone
MergeBell shows each file of a merge request’s diff, and says when GitLab held one back: “GitLab didn’t send this file’s changes: they’re over its size limit.” for a too-large file, and “GitLab collapsed this file’s changes to keep the merge request light.” for a collapsed one, each with Open on web. A file with more than 2,000 changed lines asks before drawing, with Load anyway. More on reviewing from the phone in how to review a GitLab merge request on your phone.
Frequently asked questions
Why does GitLab say "Some changes are not shown"?
It's the classic view's alert for collapsed files: a file's diff reached 10% of GitLab's diff limits, so GitLab collapsed it to keep the page fast. Select Expand all files, or expand the file. Files past the limits can't be expanded: download the plain diff or the patch to see them.
What are GitLab's diff limits?
On GitLab.com: 200 KB of diff per file, 3,000 changed files and 100,000 changed lines, and they can't be changed. On GitLab Self-Managed the defaults are 200 KB, 1,000 files and 50,000 lines, and an administrator can raise them to 500 KB, 3,000 files and 100,000 lines under Admin › Settings › General › Diff limits.
How do I see a file GitLab says is too large to show?
Download the merge request's changes from Code › Plain diff or Code › Patches, or add .diff or .patch to the merge request's URL. Or fetch the merge request locally with git fetch origin merge-requests/<iid>/head:mr-<iid> and compare it with git diff against the target branch.
Why is package-lock.json collapsed in my GitLab merge request?
GitLab collapses generated files by default: lock files such as package-lock.json, files in node_modules, minified JavaScript and CSS, source maps and generated Go files, among others. To show one, add a line like package-lock.json -gitlab-generated to .gitattributes; to collapse more, use gitlab-generated. The change applies once it's merged into the default branch.
Why doesn't my GitLab merge request show my new commits?
It may have reached GitLab's limit of 1,000 diff versions or 1,000,000 diff commits. Pushes to the branch still work, but the merge request stops updating, and GitLab says it cannot be updated further. Close it and open a new merge request.
Sources
- GitLab docs — Changes in merge requests
- GitLab docs — Diff limits administration
- GitLab docs — GitLab.com diff display limits
- GitLab docs — Instance limits: merge requests
- GitLab source — per-file diff limits (lib/gitlab/git/diff.rb)
- GitLab source — Rapid Diffs messages (no_preview_component.rb)
Checked against these pages on 2 November 2026. GitLab changes quickly — if something here no longer matches, tell us and we will fix it.
Do this from your phone with MergeBell
Free for the whole review loop: the To-Do inbox, diffs and line comments, approve and merge, pipelines with retry, and push alerts for your To-Dos. Works with gitlab.com and self-managed GitLab 16.0+.
Get MergeBell for iPhoneGet MergeBell for Android
On the App Store for iOS 26 or later and on Google Play for Android 12 or later. An independent app, not affiliated with GitLab Inc.