If one repository is over 2GB in size, one won’t be able to push or import to GitHub. Also, files larger than 100MB cannot be pushed to GitHub. However, there are some alternatives that may help one accomplish it:
- You can use the BFG repo cleaner to clean out some history or remove any large files here. If one is able to get the repository under 2GB, one’ll be able to try pushing or importing again.
- GitHub has a solution for large repositories when they consist of many large files called Git LFS, which stores large files alongside the repository, but not in the repository itself. More information is available here.
- Another workaround for this would be to push the changes in chunks from one’s local machine. The key to this would be to specify a commit SHA in the push command:
git push <remotename> <commit SHA>:<branch>
That command should push everything up to and including the specified commit. I’d suggest choosing a commit that is somewhere in the middle and trying the above command.
I hope this helps. If it doesn’t you may want to consider contacting GitHub’s support.
Leave a Reply