gpt4 book ai didi

git - 如何从gitlab存储中完全删除一个大文件

转载 作者:行者123 更新时间:2023-12-05 04:24:56 26 4
gpt4 key购买 nike

我有一个 350 MB 的 project.rar 文件。不幸的是,我提交了它并将其推送到远程 gitlab。

现在 gitlab 存储是 500 MB。如何从 gitlab 存储中删除该文件?

我试过这些:

 git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch project.rar" HEAD

然后 git push --all 但不起作用。

请帮忙,谢谢

最佳答案

必须关注GitLab's guide to purge files from a repository实际减少存储库的大小。

您必须导出项目,运行 git filter-repo,然后将生成的过滤器文件上传到 GitLab's repository cleanup .

关于git - 如何从gitlab存储中完全删除一个大文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73398968/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com