我完全无法推送到我的 GitHubmaster
分支。它抱怨一个 100+ MB 的文件甚至不是前端的一部分,该文件是 .Net 后端的一部分。前端是 Angular 13。这些是独立的项目。
我在这里能做什么?我已经用尽了所有的选择。
它抱怨 Angular webpack 缓存文件(“4.pack”)。我已将其添加到.gitignore
并且已经从 Git 方面做了我能做的事情,但没有运气。
remote: error: File .angular/cache/angular-webpack/9a0d55421134d22ded528bf53077d11bd7793d98/4.pack is 126.57 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
除了无视.angular/cache
,你可以考虑使用git filter-repo而不是过时的git filter-branch or BFG.
这样,您就会:
-
install git filter-repo(基于Python)
- 删除历史记录中的任何大文件:
git filter-repo --strip-blobs-bigger-than 2M
例如。 (基于内容的过滤)
- ignore
.angular/cache
- 力推(
git push --force
:确保通知该存储库上的任何合作者)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)