Git-pack超出了允许的最大大小 [英] Git - pack exceeds maximum allowed size
问题描述
我正在处理大量的二进制文件。在最近对本地git仓库进行更改后,我试图将我的更改重新提交给远程仓库,只是收到以下错误。
remote:fatal:pack超过最大允许大小
不幸的是我不能使用描述的策略 here ,因为所有更改都包含在一次提交中。有什么建议么?我怎样才能解决这个包大小的限制?
大量序列化文件生成代码修改和重新运行(所以一个巨头提交了很多较小的文件)
这意味着你可以将这个巨大的提交分成几个较小的文件。
- 一个
git reset HEAD〜
就足以取消提交所有文件。 - 然后添加文件的一个子集,并为所有文件重复提交
-
- 推送提交集合。
最后,修改您的脚本(默认情况下,添加并提交后面的所有内容序列化文件代),以便一次添加和提交一批文件(而不是所有内容)。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?
解决方案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).
这篇关于Git-pack超出了允许的最大大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!