2016-05-09 108 views
2

我想在GitHub上安裝谷歌地圖和一些不同的框架。
我目前使用的Mac桌面,我不明白我做錯了什麼。推送失敗的錯誤消息github大文件

Github的Mac文件錯誤:

File Pods/CardIO/CardIO/libCardIO.a is 96.28 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB   
File Pods/CardIO/CardIO/libopencv_core.a is 83.71 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB   
File Pods/CardIO/CardIO/libopencv_imgproc.a is 96.08 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB   
File Pods/PayPal-iOS-SDK/PayPalMobile/libPayPalMobile.a is 52.72 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB   
GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.   
Trace: c683784b6d6c9afc2ef456aabef1b3bf   
See http://git.io/iEPt8g for more information.   
File Pods/GoogleMaps/Frameworks/GoogleMaps.framework/Versions/A/GoogleMaps is 123.05 MB; this exceeds GitHub's file size limit of 100.00 MB 

我現在.gitattributes文件:

*.jpg filter=lfs diff=lfs merge=lfs -text  
*.framework filter=lfs diff=lfs merge=lfs -text 
+0

不斷想出解決辦法? – chicobermuda

+0

@chicobermuda請檢查下面的答案upvote如果可能的答案。 – pprevalon

回答

0

注意,由於Git LFS 2.2.0 (June 2017),首選方式導入大文件是用git lfs migrate import --include "*.a"

Git LFS 2.2.0 released

If you've tried to push a large file to GitHub without LFS, you might have seen the following error:

$ git push origin master 
# ... 
remote: error: gh001: large files detected. you may want to try git large file storage - https://git-lfs.github.com. 
remote: error: see http://git.io/iept8g for more information. 
remote: error: file a.psd is 1.2 gb; this exceeds github's file size limit of 100.00 mb 
to github.com:ttaylorr/demo.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:ttaylorr/demo.git' 

You can use the git lfs migrate info command to see which files are causing the push failure:

$ git lfs migrate info 
*.psd 1.2 GB 27/27 files(s) 100% 

Using the information above, you can determine which files to pluck out of your history and store in LFS:

$ git lfs migrate import --include="*.psd" 
migrate: Sorting commits: ..., done 
migrate: Rewriting commits: 100% (810/810), done 
    master  f18bb746d44e8ea5065fc779bb1acdf3cdae7ed8 -> 35b0fe0a7bf3ae6952ec9584895a7fb6ebcd498b 
migrate: Updating refs: ..., done 

$ git push origin 
Git LFS: (1 of 1 files) 1.2 GB/1.2 GB 
# ... 
To github.com:ttaylorr/demo.git 
* [new branch]  master -> master