Are you a GitHub user who's hit the file size limit when trying to push changes? You're not alone. GitHub has a file size limit of 100MB for individual files and a total repository size limit of 1GB. While these limits are usually sufficient, they can pose challenges when working with large files like videos, images, or datasets. In this article, we'll explore the GitHub file size limit, its implications, and strategies to work around it.
Understanding the GitHub File Size Limit
GitHub's file size limit is a crucial aspect to understand when working with large files. The limit applies to both individual files and the total repository size. Here's a breakdown:
- Individual File Size Limit: 100MB
- Total Repository Size Limit: 1GB
These limits are in place to ensure GitHub's servers can handle the data efficiently and to prevent users from storing large amounts of data that could potentially slow down the platform.

Implications of the GitHub File Size Limit
Hitting the GitHub file size limit can lead to several issues. Here are a few:
- You won't be able to push or pull changes to/from your repository.
- You might lose unsaved changes if GitHub can't push them to the remote repository.
- You could face difficulties when collaborating with others, as they might also hit the limit when trying to clone or pull your repository.
Error Messages
When you hit the GitHub file size limit, you'll typically see an error message like this:
"Error: File ... is too large (104.86 MB vs 100.00 MB)."
Or, for the repository size limit:

"Error: Repository ... is over its storage limit of 1GB."
Strategies to Work Around the GitHub File Size Limit
If you're working with large files, here are some strategies to help you work around the GitHub file size limit:
1. Use Git LFS (Large File Storage)
Git Large File Storage (LFS) is a GitHub feature that replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server. This allows you to push and pull large files without hitting the file size limit.
2. Split Large Files
If Git LFS isn't an option, you can split large files into smaller ones. For example, if you're working with a large dataset, you could split it into smaller, manageable files. This approach might not be practical for all types of large files, but it's worth considering.

3. Use Compression
Compressing large files before pushing them to GitHub can help reduce their size. However, keep in mind that compressed files might still be too large, and decompressing them on GitHub might not be feasible.
4. Use a Different Version Control System
If you're still having trouble with GitHub's file size limits, you might want to consider using a different version control system that supports larger files. For instance, Mercurial has a default file size limit of 2GB per file.
Conclusion
Understanding and working with GitHub's file size limits is crucial for efficient use of the platform. Whether you're using Git LFS, splitting large files, compressing them, or considering a different version control system, there are strategies to help you work around these limits. By being aware of these limits and the available workarounds, you can ensure a smoother and more productive GitHub experience.





















