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
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