3

I have the file in my project, that more than 100 MB. I want to push it using git-lfs, but something went wrong and I receiving the same message from remote, that "this file exceeds GitHub's file size limit of 100.00 MB".

What I've done.

1. Downloaded git-lfs.
2. Installed it using brew.
3. Added files and patterns that should be tracked in the .gitattributes. 
4. Tried to push.

Now, my .gitattributes file have the following.

*.framework filter=lfs diff=lfs merge=lfs -text
ios/libs/** filter=lfs diff=lfs merge=lfs -text
ios/libs/GoogleMobileAds.framework/GoogleMobileAds filter=lfs diff=lfs merge=lfs -text
GoogleMobileAds filter=lfs diff=lfs merge=lfs -text
ios/libs/ filter=lfs diff=lfs merge=lfs -text

I need to push ios/libs/GoogleMobileAds.framework/GoogleMobileAd <- this file. And I tried to add it in various ways, but nothing helped.

Any ideas what I'm missed?

Thanks.

Gag Baghdasaryan
  • 716
  • 1
  • 11
  • 22

3 Answers3

4

I solved my problem.

git add .gitattributes  isn't enough.

You need to push .gitattributes in order to be able to push large files to remote.

I reset my last commit, then added .gitattributes again and pushed it, after that, I was able to push the large file.

Thanks, @Sidharth Chhawchharia for the comment.

Gag Baghdasaryan
  • 716
  • 1
  • 11
  • 22
2

Make sure .gitattributes is tracked. You could do it by using:

git add .gitattributes

In case it is an existing repository, please refer this answer: https://stackoverflow.com/a/33633291/4190333

0

This helped me, just configured git LFS with:

git config http.postBuffer 524288000
git config lfs.contenttype 0
Ayrum
  • 51
  • 1
  • 2