【问题标题】:LFS File not pushingLFS 文件未推送
【发布时间】:2022-01-23 05:13:23
【问题描述】:

我正在尝试进行 LFS 推送,但这似乎对我不起作用

我使用了以下命令

git lfs install 
git lfs track "X" 
git add .gitattributes
git commit -m "LFS added"
git push origin main

这似乎不起作用,所以我参考了SO 上的一个主题并使用了以下 cmets

git config --global lfs.allowincompletepush true
git lfs push --all origin main

在尝试再次推送之后似乎也没有用,所以我尝试了:

git config --global lfs.contenttype 0

还没有解决?有什么想法吗?

那些想知道的错误:

remote: Resolving deltas: 100% (11082/11082), done.
remote: error: Trace: a0c4773907c1208cb55f235c3169f15af2f3bf0000300aba7f3a687ffd0589e1
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Library/ArtifactDB is 128.00 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 https://github.com/JannickOste/Camelot2D
 ! [remote rejected]   main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/JannickOste/Camelot2D'

【问题讨论】:

标签: git git-lfs


【解决方案1】:

git lfs track 不会导致已经提交的文件转换为 LFS 文件。它只对在命令运行后添加到索引或提交的文件有影响。

如果要更改历史记录,则需要运行git lfs migrate import --everything --include='X'(其中X 是您想要的文件模式)。

请注意,您应该禁用lfs.allowincompletepush,因为如果您不小心,最终可能无法推送数据,如果没有另一个副本,您可能会遇到数据丢失。

【讨论】:

    猜你喜欢
    • 2020-01-03
    • 1970-01-01
    • 2020-05-08
    • 2021-12-22
    • 1970-01-01
    • 1970-01-01
    • 2022-10-23
    • 2019-09-19
    • 1970-01-01
    相关资源
    最近更新 更多