Skip to content
Private: files never leave your device

GitHub File Size Limits

GitHub applies different ceilings depending on how a file arrives. A browser upload, a Git push, a Git LFS object, a release asset and an issue attachment each follow their own rule, and this chart lists them side by side.

GitHub limits: 25 MiB for browser uploads, a warning at 50 MiB, files over 100 MiB blocked without Git LFS, and a 2 GB limit on a single push

GitHub blocks any file larger than 100 MiB in a regular Git repository, warns you above 50 MiB, and accepts no more than 25 MiB when you add a file through the browser. Larger files need Git LFS, which allows 2 GB to 5 GB per file depending on your plan. Every figure below was checked against GitHub Docs on 19 November 2026.

GitHub file size limits chart

The first three rows come from GitHub's page About large files on GitHub.

How the file is addedLimitWhat happens at the limit
Web browser upload25 MiB per fileThe file cannot be added this way, so use Git or Git LFS
Git push, warning levelOver 50 MiBGit warns you, but the push still succeeds
Git push, hard blockOver 100 MiBGitHub blocks the file
Git LFS object2 GB to 5 GB, by planGit LFS rejects the file with an error message
Release assetBelow the Git LFS maximum for your planTotal release size and bandwidth are not limited
MiB or MB? GitHub states these limits in mebibytes. One MiB is 1,048,576 bytes, so the 100 MiB block falls at 104,857,600 bytes, about 104.9 MB in decimal units. A file your computer labels 101 MB may still pass, depending on which unit it uses.

Git LFS limits by plan

Per-file maximums are listed in About Git Large File Storage. The included allowances are on GitHub's Git LFS billing page.

PlanLargest LFS fileIncluded storageIncluded bandwidth
GitHub Free2 GB10 GiB10 GiB
GitHub Pro2 GB10 GiB10 GiB
GitHub Free for organizationsNot listed separately10 GiB10 GiB
GitHub Team4 GB250 GiB250 GiB
GitHub Enterprise Cloud5 GB250 GiB250 GiB

Without a payment method, going over the storage allowance means clones receive pointer files only and new LFS files cannot be pushed. Going over the bandwidth allowance disables Git LFS on the account until the next month. Git LFS also cannot be used with GitHub Pages sites or template repositories.

Repository and push limits

GitHub separates enforced limits from recommendations. These figures come from its repository limits page, apart from the 1 GB and 5 GB guidance, which is on the large files page.

ItemFigureStatus
Single push2 GBEnforced
Single Git object100 MBEnforced, with 1 MB recommended
Repository sizeIdeally under 1 GB, and under 5 GB strongly recommendedRecommended
On-disk size of the .git folder10 GBRecommended
Entries in one directory3,000Recommended
Directory depth50 levelsRecommended
Branches5,000Recommended
Pushes per repository6 per minuteRecommended
Repositories per account or organization100,000May not be exceeded

As a worked example, 30 files of 90 MiB each pass the per-file block, but together they total 2,700 MiB. That exceeds the 2 GB push limit, so they must be sent across at least two pushes, and they would also take the repository past the recommended size.

Issue and pull request attachments

Files attached to comments have separate limits, published in GitHub's guide to attaching files.

AttachmentMaximum size
Images and GIFs10 MB
Videos in a repository owned by a free plan10 MB
Videos in a repository owned by a paid plan100 MB
All other supported files25 MB

On a paid-plan repository, uploading a video over 10 MB requires you to be an organization member, an outside collaborator or on a paid plan yourself. GitHub recommends H.264 for the widest video playback.

When GitHub will not display a file

A file can be stored successfully and still fail to preview. GitHub says formatted previews are attempted for small files, generally under 2 MB, and complex files may fall back to plain text or not display at all. Pull requests have their own display limits too: 300 files in a single diff, and 20,000 loadable lines or 1 MB of raw diff data in total.

How to fit a file under the limit

FileBest optionTool or action
Screenshot or demo image for a READMEReduce it under the 10 MB attachment limitCompress Image
Demo video for an issueLower the resolution or trim it to fit 10 MBCompress Video
PDF documentationShrink embedded images before committingCompress PDF
Large JSON sample dataRemove whitespace, then test with a smaller sampleJSON Formatter
Binary build outputPublish it as a release asset instead of committing itGitHub Releases
Model, dataset or media that must stay versionedTrack it with Git LFSgit lfs track

Removing a large file in a new commit does not remove it from history, so a blocked push can keep failing until the commit that added the file is rewritten. If you share big files outside GitHub, compare our Google Drive and Dropbox limit charts.

Frequently asked questions

What is the GitHub file size limit?

GitHub blocks files larger than 100 MiB in regular Git repositories and warns above 50 MiB. Files added through a browser can be no larger than 25 MiB.

What is the maximum file size with Git LFS?

Git LFS allows 2 GB per file on GitHub Free and Pro, 4 GB on GitHub Team and 5 GB on GitHub Enterprise Cloud.

Why does GitHub say 25 MB when the limit is 100 MB?

The 25 MiB limit applies only to files added through the browser. Using Git from the command line raises the ceiling to 100 MiB per file.

How big can a GitHub repository be?

GitHub recommends keeping repositories ideally under 1 GB and strongly recommends under 5 GB. It may contact you if a repository excessively affects its infrastructure.

How large can a single push to GitHub be?

GitHub enforces a limit of 2 GB on a push. Split larger uploads across several pushes, while keeping each file within the per-file limit.

Is there a size limit on GitHub release files?

GitHub does not limit the total size of a release or its bandwidth, but each file must be smaller than the Git LFS maximum for your plan.