git commit错误:检测到大文件 [英] git commit error: large file detected

查看:125
本文介绍了git commit错误:检测到大文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

  iSpire-Solution-1:productionPreFinal 2 $ git push -u origin master 
计数对象:762,完成。
使用多达4个线程的增量压缩。
压缩对象:100%(693/693),完成。
写作对象:100%(762/762),83.82 MiB | 4.14 MiB / s,完成。
总计762(增量179),重用0(增量0)
远程:错误:GH001:检测到大文件。你可能想尝试Git Large File Storage - https://git-lfs.github.com。
remote:error:跟踪:e7a6ab16d31c340cad67b08ee53ee032
remote:错误:有关更多信息,请参阅http://git.io/iEPt8g。
remote:error:File Pods / GoogleMaps / Frameworks / GoogleMaps.framework / Versions / A / GoogleMaps is 113.56 MB;这超过了GitHub的文件大小限制为100.00 MB
到https://github.com/ispire123/AutoM8.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:未能推送一些文件到'https://github.com/ispire123/AutoM8.git'
iSpire-Solution-1:productionPreFinal 2 $ git lfs跟踪
列出跟踪路径
Pods / GoogleMaps / Frameworks / GoogleMaps.framework / Versions / A / GoogleMaps(.gitattributes)

请教我如何管理git lfs。有没有什么选择减少iOS中googleMaps框架的文件大小。



谢谢。

解决方案

假设您使用 CocoaPods 作为Xcode项目的依赖项管理器,请考虑遵循建议和只提交Podfile作为Pod可以从Podfile重新生成。



这意味着您没有提交 Github的文件限制,并保持您的存储库简化。



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

Hi I'm developing an application xcode for ios 8.1 I have used googleMaps framework for autocomplete feature. when I try to push my project in Git I was getting large file detection error. later have tried with git lfs and tracked the file detected by git (i.e., GoogleMaps) then I tries push still showing the same error.

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)

Please suggest me how can i Manage git lfs. and is there any option reduce the file size of googleMaps frameworks in iOS.

Thanks.

解决方案

Assuming you're using CocoaPods as a dependency manager for your Xcode project, consider following this advice and only committing the Podfile as the pods can be regenerated from the Podfile.

This means that you're not committing over Github's file limit and you're keeping your repository streamlined.

To ensure you don't commit any Pods to your repo, just add the pods/ directory to your/a .gitignore file.

这篇关于git commit错误:检测到大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆