git commit error:检测到大文件

时间:2016-03-16 05:51:42

标签: ios git

您好我正在为ios 8.1开发应用程序xcode我使用了googleMaps框架来实现自动完成功能。当我尝试在Git中推送我的项目时,我遇到了大文件检测错误。后来尝试使用git lfs并跟踪git检测到的文件(即GoogleMaps),然后我尝试推送仍然显示相同的错误。

iSpire-Solution-1:productionPreFinal 2$ git push -u origin master
Counting objects: 762, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (693/693), done.
Writing objects: 100% (762/762), 83.82 MiB | 4.14 MiB/s, done.
Total 762 (delta 179), reused 0 (delta 0)
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: e7a6ab16d31c340cad67b08ee53ee032
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/GoogleMaps is 113.56 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/ispire123/AutoM8.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/ispire123/AutoM8.git'
iSpire-Solution-1:productionPreFinal 2$ git lfs track
Listing tracked paths
    Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/GoogleMaps (.gitattributes)

请建议我如何管理git lfs。是否有任何选项减少iOS中googleMaps框架的文件大小。

感谢。

1 个答案:

答案 0 :(得分:1)

假设您使用CocoaPods作为dependency manager for your Xcode project,请考虑遵循this建议并仅提交Pod文件,因为可以从Podfile重新生成窗格。

这意味着您没有提交Github's file limit而且您的存储库已经过简化。

为确保您不将任何Pod提交到您的仓库,只需将pods/目录添加到/ .gitignore文件中。