[英]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-214
和
git 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
, andG
suffixes are recognized), eg:如果你想过滤掉所有大于特定大小的文件,你可以使用
--strip-blobs-bigger-than
一些大小(识别K
,M
和G
后缀),例如: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.