GitHub Push Rejected: File Exceeds 100 MB Limit
Quick answer
GitHub blocks any file over 100 MiB and warns above 50 MiB. Remove the file from the commits being pushed (including history) or track it with Git LFS or a release asset.
Most likely fix: Remove it if it is the most recent unpushed commit
How to fix it
Try these in order — the most common fix is first.
1. Remove it if it is the most recent unpushed commit
- git rm --cached path/to/file
- git commit --amend -C HEAD
- git push
Did this fix it?2. Remove it from earlier commits
- Back up the file first
- Use git filter-repo (recommended by GitHub) to strip the path from history
- Then push; an interactive rebase works only if the commit is on one branch with no merges since
Did this fix it?3. Track large files with Git LFS
- Install Git LFS and run git lfs track "*.psd" (your pattern)
- Commit .gitattributes and re-add the file
- Each file must fit the max LFS file size of your plan
Did this fix it?4. Distribute binaries as release assets
- Attach large files to a GitHub release instead of committing them
- Keep the repository under 1 GB, and under 5 GB at most, as GitHub recommends
Did this fix it?
Symptoms
git push fails with 'this exceeds GitHub's file size limit of 100.00 MB' and 'pre-receive hook declined'.
Why it happens
- A single file larger than 100 MiB is in a commit being pushed
- The big file was committed earlier and only deleted in a later commit, so it remains in history
- Files uploaded through the browser are limited to 25 MiB
This guide also covers
- github file exceeds 100 mb
- pre-receive hook declined github large file
- remote file exceeds github's file size limit
- github git lfs setup
Still not working?
If GitHub keeps failing, you're not alone. See every GitHub problem users report or the alternatives people switch to.
Need a custom web app or internal tool? Our small team builds it, on your domain or hosted by us. Price agreed together.
Get a quoteOther GitHub errors
- GitHub Permission Denied (publickey) Error
- GitHub 'Password Authentication Was Removed' Error
- GitHub Push Rejected: Updates Were Rejected (Non-Fast-Forward)
- GitHub Push Blocked: Repository Rule Violations (GH013 / Secret Detected)
- GitHub 'Permission Denied' or 403 When Pushing Over HTTPS
- GitHub Locked Out: Lost 2FA Device or Recovery Codes
- GitHub Actions Workflow Stuck in Queued / Waiting for a Runner
- GitHub Actions: 'Recent Account Payments Have Failed or Spending Limit Needs to Be Increased'