Search code examples
gitspringloops

Git: fail to unpack


I made a lot of changes in my repository, and I of course, forgot my .gitignore file.

In this file, it was said that the /vendor folder should not be included. This folder's size is 400mb.

So I tried to push my project thanks to:

git add -A
git commit -m "commit"
git push test master

It failed, because the project was too big:

error: unpack failed: error Object too large (201,984,000 bytes), rejecting the pack. Max object size limit is 104,857,600 bytes.

I added the .gitignore file again, and ran:

git rm -r --cached .

But when I push it again, I still have the same error (with the same sizes), even if the "vendor" folder is not included anymore.

It's like git was keeping an old version of the commit...

Do you have any idea on how to fix this?

BTW, I'm pushing it to springloops.


Solution

  • What I did was simply removing the .git folder, then git init again. It's now working correctly.