【问题标题】:How to solve Git lfs will skip tracked files?如何解决 Git lfs 会跳过跟踪的文件?
【发布时间】:2017-05-31 11:30:03
【问题描述】:

我在使用 GIT LFS 时遇到了一些问题。当我将 CocoaPods 添加到我的 Xcode 项目时,我在向 git 添加提交时遇到了一些问题。 GitHub 的文件大小限制为 100.00 MB 的错误。经过一番研究,我来到了 LFS 图书馆。安装后,我克隆了没有 CocoaPods 的项目。添加 Pod 文件并安装 GVRSDK Pod。

之后我执行了以下命令:

git lfs track [files that where been added by CocoaPods]
git lfs track - The tracked files where tracked
git add .
git commit -m "Added Pods to project"
git push

但是在推送提交后,我收到了同样的错误。它还说:Git LFS: (0 of 0 files, 8 skipped) 0 B / 0 B, 112.96 MB skipped.

我已将我的 git 更新到最新版本的 2.13.0

我做错了什么或者我错过了什么?我遵循了这个教程:https://github.com/git-lfs/git-lfs/wiki/Tutorial

完整的错误是:

Git LFS: (0 of 0 files, 7 skipped) 0 B / 0 B, 1.02 KB skipped Counting objects: 760, done. Delta compression using up to 8 threads. Compressing objects: 100% (600/600), done. Writing objects: 100% (760/760), 57.14 MiB | 73.00 KiB/s, done. Total 760 (delta 212), reused 0 (delta 0) remote: Resolving deltas: 100% (212/212), done. remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com. remote: error: Trace: 4e56dff020008a4a06c019a10618d5ab remote: error: See http://git.io/iEPt8g for more information. remote: error: File Pods/GVRSDK/Libraries/libGVRSDK.a is 112.96 MB; this exceeds GitHub's file size limit of 100.00 MB To https://github.com/Caspert/RSRVR ! [remote rejected] dev -> dev (pre-receive hook declined) error: failed to push some refs to 'https://github.com/Caspert/RSRVR'

【问题讨论】:

    标签: git github


    【解决方案1】:

    看起来 GitHub 有一个限制,即使是 LFS 文件,根据您收到的错误:remote: error: File Pods/GVRSDK/Libraries/libGVRSDK.a is 112.96 MB

    GitHub's documentation:

    当推送大于 50 MB 的文件时,GitHub 会发出警告。不允许推送大于 100 MB 的文件。

    【讨论】:

    • 这很奇怪,因为我已经有一个使用GVRSDK pod的项目并且提交和推送不会有任何问题。到现在为止..
    • 您确定其他项目的文件大于 100 MB 吗?也许有新版本的 SDK?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-01-25
    • 2016-05-02
    • 1970-01-01
    • 2020-08-06
    • 1970-01-01
    • 1970-01-01
    • 2020-01-01
    相关资源
    最近更新 更多