简体   繁体   English

文件 admin config.zip 为 169.57 MB; 这超过了 GitHub 的文件大小限制 100.00 MB

[英]File admin config.zip is 169.57 MB; this exceeds GitHub's file size limit of 100.00 MB

I was copying some files in my folder and by mistakenly I added 169.57MB zip file and because of not knowing about the zip file I run git command git add.我正在复制文件夹中的一些文件,错误地添加了 169.57MB zip 文件,由于不知道 zip 文件,我运行 git 命令git add. and git commit -m "new feature added" and finally git push origin bugSolver-214git commit -m "new feature added"最后git push origin bugSolver-214

and when the process was running I saw zip file and terminated the process in middle by doing ctrl + c and delete the zip file and again done above steps git add.当进程运行时,我看到 zip 文件并通过ctrl + c终止进程并删除 zip 文件并再次完成上述步骤git add. git commit -m "new feature added" git push origin bugSolver-214 git commit -m "new feature added" git push origin bugSolver-214

I saw this msg我看到这条消息

remote: error: Trace: cf3cf1a67efcc5bc0461f8937f71d0f505487379cc1a3c870b480c7cf60126a7
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File admin config.zip is 169.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.

As I already removed the permanently zip file I can't see how I can remove admin config.zip file因为我已经删除了永久性的 zip 文件,所以我看不到如何删除admin config.zip文件

So I made some changes in my code and tried to commit again but it still showing me same issue所以我对我的代码进行了一些更改并尝试再次提交,但它仍然显示相同的问题

I searched inte.net created new branch but same error even tried git reset.我搜索了 inte.net created new branch 但同样的错误甚至尝试git reset. but no help但没有帮助

even tried this to git rm --cached "admin config.zip"甚至试过git rm --cached "admin config.zip"

fatal: pathspec 'admin config.zip' did not match any files

is there any way I can remove that admin config.zip file and commit my code again有什么办法可以删除该admin config.zip文件并再次提交我的代码

One option, for getting rid of large files in past commits, is to use git filter-repo (python-based, to be installed first )一个选项,为了摆脱过去提交中的大文件,是使用git filter-repo (基于 python,首先 安装

And use some content-based filtering :并使用一些基于内容的过滤

If you want to filter out all files bigger than a certain size, you can use --strip-blobs-bigger-than with some size ( K , M , and G suffixes are recognized), eg:如果你想过滤掉所有大于特定大小的文件,你可以使用--strip-blobs-bigger-than一些大小(识别KMG后缀),例如:

 git filter-repo --strip-blobs-bigger-than 100M

Then a git push --force will update your branch (which is fine if you are the only one working on it)然后git push --force将更新你的分支(如果你是唯一一个在它上面工作的人,这很好)


In your case though, if this was done recently (just in the last commit), you could:但是,在您的情况下,如果这是最近完成的(就在最后一次提交中),您可以:

git reset --soft @~1
echo "*.zip">> .gitignore
git add .
git commit -m "re-add everything except zip files"
git push --force

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Git lfs - “这超出了 GitHub 的文件大小限制 100.00 MB” - Git lfs - "this exceeds GitHub's file size limit of 100.00 MB" 将代码从 Gerrit 移动到 Github 时遇到“这超出了 GitHub 的文件大小限制 100.00 MB”错误 - Facing " this exceeds GitHub's file size limit of 100.00 MB" error while moving code from Gerrit to Github .vs / slnx.sqlite超过GitHub的文件大小限制100.00 MB - .vs/slnx.sqlite exceeds GitHub's file size limit of 100.00 MB 无法将我的 React 项目推送到 Github,文件大小超过 100.00MB - Cannot push my React project to Github, file size exceeds file size of 100.00MB 推送到 GitHub 失败(这超出了 GitHub 的文件大小限制) - Failing to push to GitHub (this exceeds GitHub's file size limit) git push文件超过了100MB的限制 - git push file exceeds the limit of 100MB 上一次提交的文件大小限制为100.00 - File size limit of 100.00 in previous commit 对文本文件的GitHub 100MB文件大小限制有什么好的解决方法吗? - Are there any good workarounds to the GitHub 100MB file size limit for text files? 即使在删除文件后,开发日志文件也超过了GitHub的文件大小限制 - Development Log file exceeds GitHub's file size limit, even after deleting file 在 Github 上上传文件 > 25 MB - Upload file > 25 MB on Github
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM