尽管成功上传了 LFS 对象,但 Git 大型文件存储没有推送到 repo

问题描述 投票:0回答:1

当我运行

git lfs ls-files -s
时,LFS 告诉我文件正在被跟踪:

72face5c11 - client/data.ms/indexes/18a4b1f0-393d-434d-9129-9f15c834fb61/data.mdb (335 MB)
1c383961b7 - client/meilisearch (240 MB)

但是当我做

git push origin master
时,我遇到了以下错误:

Uploading LFS objects: 100% (2/2), 576 MB | 0 B/s, done.                                             
Enumerating objects: 243, done.
Counting objects: 100% (243/243), done.
Delta compression using up to 8 threads
Compressing objects: 100% (229/229), done.
Writing objects: 100% (239/239), 197.80 MiB | 1.05 MiB/s, done.
Total 239 (delta 111), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (111/111), completed with 2 local objects.
remote: error: Trace: 173bb3fae212a36eacc3d98786ab6b65b65ca04ec69e58ab805404ea536c7cbc
remote: error: See https://gh.io/lfs for more information.
remote: error: File meilisearch is 229.14 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File data.ms/indexes/18a4b1f0-393d-434d-9129-9f15c834fb61/data.mdb is 319.81 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.                                                                                      To github.com:Gaurav-Narayan-Varma/healthmaps.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'my-git-repo'
git github push git-push git-lfs
1个回答
1
投票

请仔细阅读错误信息。 Git LFS 消息和来自 GitHub 预接收挂钩的错误与两个不同的文件有关。前者在

client/data.ms
下,后者在
data.ms
下。

只需删除 GitHub 抱怨的文件/目录并执行

git commit --amend
.

还要确保不仅在最近的提交中删除文件,而且在必要时使用

git rebase - i
删除祖先提交中的文件。

© www.soinside.com 2019 - 2024. All rights reserved.