Push exceeding the 100mb limit #23284
-
Hey guys, Sorry for the “repost”, i know there are been plenty of topics on this particular issue, but as a non-native english speaker, a non-programmer and a newbie github user i really struggled understanding the solutions given to this problem. I’m working on a school project, and I unfortunately commited a 100+mb file. I then tried to push and got the error So far I :
But the error is still the same… Help ? If I ever need to use Git or Git Bash or whatever, please be very clear on your instructions and do not assume I know anything about these… Because I don’t ahah Thanks a lot |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If you used the
There are also other ways that you could do the above that don’t necessarily require the use of So the first set of boxes is the state of things just after you make the commit with the large file. From there, you can execute Now, notice that the “bad commit” still exists in the second set of boxes. This is because git tries really, really, really hard to never forget anything. But, when you push, git only transmits the objects that are “reachable” by the branch you’re pushing. So, even though the bad commit exists on your local machine, if you pushed at this stage, you wouldn’t get the error because git wouldn’t transmit the commit that contains the file that is too large. So, to get to the third set of boxes, you delete the too large file and then commit everything but it. This creates the new commit on the leftward fork in the image. So when you run I hope that helps! Let me know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
I would recommend that you check out GitHub desktop, a GUI app for committing repositories. It works the same way as git, but has a GUI interface and would stop you from committing to a repository if a file is too large to prevent data loss. This is an official tool written by GitHub and can be downloaded from their webpage. |
Beta Was this translation helpful? Give feedback.
If you used the
git revert
command, I can see where you ran into this problem. This is because git is designed very, very well to prevent people from losing information in their repositories. In almost all cases, a git repository only grows , never shrinks. So, if I’m right about you using thegit revert
command, here’s what happened:git revert
which creates a new commit where the large file doesn’t exist but leaves the large file in the repository’s history of commitsThere are also other ways that you could do the above that don’t necessar…