• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • About
  • Contact
  • Official Website
Gonçalo Peres Notes

Gonçalo Peres Notes

The Blog of Gonçalo Peres

  • Books
  • Guides
  • Personal
  • Career and Business
  • Nourish
  • Outdoors
  • Science, Technology, Engineering and Maths

Import or Push large repositories to GitHub

February 16, 2021 by Gonçalo Peres Leave a Comment

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:

  1. 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.
  2. 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.
  3. 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.

Filed Under: Open Source, Operations, Science, Technology, Engineering and Maths Tagged With: How To

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About

Gonçalo Peres

Gonçalo Peres

Entrepreneur, researcher, and consultant.

Go ahead and send me a message.
I look forward to exploring the opportunity to help you, your enterprise or your project.

Search

More to See

Import or Push large repositories to GitHub

February 16, 2021 By Gonçalo Peres

AI Notebooks with GitHub repo in GCP

February 16, 2021 By Gonçalo Peres

How to blur your house on Google Street View

September 22, 2020 By Gonçalo Peres

Tags

Feature How To Software

Footer


Entrepreneur, researcher and consultant.

Connect with Gonçalo


Privacy Center

Gonçalo Peres has a dedicated privacy department. Here one can find all the legal information and submit queries.

© 2023 Gonçalo Peres and/or its affiliates. All rights reserved.