我有一个 github 存储库,其中使用了大约 1.7GB 的 lfs 存储空间,我正在为此支付升级后的存储空间计划。
我和我的其他 6 人小组在一个大学游戏项目中使用了这个 repo,他们都对它进行了分叉,并向主(我的)repo 提出了拉取请求。现在不再需要它,我想将文件从 git-lfs 中移出,以便我可以降级我的 GitHub 存储计划。
我已经尝试过这个,它可以将重写的 git 历史推送到远程。它给出了以下错误
这可能是因为每个人都有这个项目的分叉,这在某种程度上干扰了钩子
$ git push -f origin main
Counting objects: 29565, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (15821/15821), done.
Writing objects: 100% (29565/29565), 1.14 GiB | 5.88 MiB/s, done.
Total 29565 (delta 20562), reused 19031 (delta 13663)
remote: Resolving deltas: 100% (20562/20562), done.
remote: warning: File Freight/Assets/Audio/backGroundMusic.mp3 is 55.00 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: warning: File Freight/Library/ArtifactDB is 64.00 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: c9bef6e7c4f23ee4f0736658211f57157ea734dda69a25e5edc662c1b2cf04a4
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File frontend/public/Build/webstef4.data.unityweb is 113.81 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File frontend/public/Build/webstef4.data.unityweb is 107.64 MB; this exceeds GitHub's file size limit of 100.00 MB
To git@github.com:user/repo.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:user/repo.git'
(旁注,我还删除了前端文件夹,但它仍在尝试推送它,即使它不存在我认为这是因为该文件是在 git 历史记录中的某个时间点添加的,因此该文件仍然存在但隐)