Git push throwing error: GH001: Large files detected

我的梦境 提交于 2019-12-02 03:53:14

问题


I am pushing my Xcode project which written in Swift to GitHub. In this project I used GoogleMaps SDK for IOS and GoogleMaps framework integrated with few other frameworks which made this project heavy as I expected. particularly there is one file called GoogleMaps is over 100MB which is violating GitHub's policy thus I am getting below error.

C:\Users\Shyam Bhimani\Desktop\FindMyBuddy>git push

Git LFS: (0 of 0 files, 1 skipped) 0 B / 0 B, 34 B skippedCounting objects: 691, done.

Delta compression using up to 4 threads. Compressing objects: 100% (597/597), done.

Writing objects: 100% (691/691), 60.52 MiB | 384.00 KiB/s, done.

Total 691 (delta 161),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: a2d7f29c8861bcb6bd13498cfcd44ac3

remote: error: See http://git.io/iEPt8g for more information.

remote: error: File Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/GoogleMaps is 123.08 MB; this exceeds GitHub's file size limit of 100.00 MB To https://github.com/shyambhimani/FindMyBuddy.git ! [remote rejected] master -> master (pre-receive hook declined)

error: failed to push some refs to 'https://github.com/shyambhimani/FindMyBuddy.git'

So far I have tried

Git lfs track 'Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/GoogleMaps'

git lfs track '*.*' 

git lfs track '*.File'

However no luck It still gives me same error every time I push.

I do not know extention of that file so I tried *.* just in case if it works but it did not.

I would be grateful if anyone could help me to solve this issue. TIA


回答1:


GitHub has a limit of 100MB unless you pay for Git LFS. Sadly there is no way to get around this unless you ignore files using .gitignore. But those files will no longer be tracked by git.

EDIT

Forgot to mention for your specific case especially with a common framework such as Google Maps it is very easy to re download that at a later date using CocoaPods. Personally I would ignore that whole folder in .gitignore because after you pull down your repo you can always re download it easily.



来源:https://stackoverflow.com/questions/38669146/git-push-throwing-error-gh001-large-files-detected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!