Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - pack exceeds maximum allowed size

I'm working with a large number of binary files. After a recent change to a local git repo, I tried to push my changes back up to the remote, only to receive the following error.

remote: fatal: pack exceeds maximum allowed size

Unfortunately I can't use the strategy described here, since all the changes are contained in a single commit. Any suggestions? How can I get around this pack size restriction?

like image 352
Madison May Avatar asked Jul 11 '14 19:07

Madison May


1 Answers

A lot of serialized files are generated on code modification and rerun (so one giant commit with lots of smaller files)

That means you can split that huge commit in several smaller one.

  • A git reset HEAD~ will be enough to "un-commit" all the files.
  • then add a subset of the files, and commit
  • repeat for all the files
  • push a collection of commits.

Finally, modify your script (which by default adds and commit everything after that "serialized files" generation) in order to add and commit only a batch of files at a times (instead of everything).

like image 185
VonC Avatar answered Oct 13 '22 01:10

VonC