2

I added the metaio framework to my project to play around with it. I kinda got it working, so I branched my github code and checked in. During the push it failed, noting that the library was 150 MB!!!

So, back to the drawing board. I deleted metaio and all the code that was using it. I then made a new branch and checked into that. And when I pushed, I got...

remote: error: GH001: Large files detected.        
remote: error: Trace: 9480e8f79b3b6b732bab33a002143676        
remote: error: See http://git.io/iEPt8g for more information.        
remote: error: File ThirdParty/metaioSDK.framework/metaioSDK is 140.84 MB; this exceeds GitHub's file size limit of 100 MB        

I looked, there isn't a single file from metaio left on my machine. But every push causes the same error to occur. The URL doesn't really say where it might be either.

I assume there's something stuck on the server side somewhere... any ideas?

Maury Markowitz
  • 9,082
  • 11
  • 46
  • 98

1 Answers1

0

If you committed a big file, deleting the code in your working tree isn't enough to make it go away from the history of your repo.

Said history, on the next push, would still include that large file, even if your present working tree has been committed with a smaller content.

You need to cleanup the history of your repo with git filter-branch (as in this answer) or with BFG.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I kinda understand this, except for one thing... if the large file is deleted, what exactly is it spending so much time on my network doing? Is this file copied into a database or something? – Maury Markowitz May 05 '14 at 12:44
  • @MauryMarkowitz deleting means here just removed from the working tree. It doesn't mean that it is removed from the latest commit or from previous commit. If those past commits weren't pushed yet, they would still be pushed, with the large file in them. Hence the suggestion of using BFG for instance. – VonC May 05 '14 at 12:47
  • No I get that, but the large file in question is physically removed from my hard drive. So is a copy of that file, perhaps with some other name, still on my system somewhere? – Maury Markowitz May 05 '14 at 12:52
  • Ok, I can't find my .git folder, bfg crashes on my machine with a Class not found, I can't understand a word of the --filter dox. I give up. So how do I burn this machine clean of everything and start over with a completely new code base from the remote? – Maury Markowitz May 05 '14 at 17:44
  • @MauryMarkowitz simply `git clone` your remote repo url to another folder. But if that clone still have a large size, then you can init an empty repo locally, add the right files (ie not big ones), add a remote origin to the remote repo url (`git remote add origin /your/url`), and `git push -f -u origin master`: that would erase the history on the remote side by a brand new one. – VonC May 05 '14 at 17:47
  • I think that's what I ended up doing, but a different way. I deleted the entire source tree from my computer and then re-downloaded. I suppose this means my git repo is physically in the development folder somewhere, but neither I nor BFG could find it. – Maury Markowitz May 05 '14 at 17:56