3

I am trying to push a repository onto Github, but I cannot as "large files are detected". The largest file is only 38 MB! There should be no problem.

However, the error states that the file datafiles/FILENAME.json is 2016.04 MB, and is still in this subdirectory. But I have deleted this! I have also used git commit, so those changes should be committed.

I go into the subdirectory (which has already been initialized with git init). I then try to use sudo git push origin master.

This is the error I get after $ sudo git push origin master:

Counting objects: 19, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (18/18), done.

Writing objects: 100% (19/19), 1.69 GiB | 385.00 KiB/s, done.

Total 19 (delta 9), 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: b2274b496089a760fae877fdaf3d8b23

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

remote: error: File datafiles/FILENAME.json is 2016.04 MB; this exceeds GitHub's file size limit of 100.00 MB

What is the problem?

ShanZhengYang
  • 16,511
  • 49
  • 132
  • 234
  • Note: I don't think you need to use `sudo`. – Nayuki Nov 13 '15 at 16:09
  • 1
    The file might still be in your git history. Did you commit it, then try to push it, then create a second commit that removed it? See [this github tutorial if so](https://help.github.com/articles/removing-files-from-a-repository-s-history/). – Pokechu22 Nov 13 '15 at 16:11
  • I think The BFG is the way to go! Future readers, please go here https://rtyley.github.io/bfg-repo-cleaner/ – ShanZhengYang Nov 13 '15 at 20:59

1 Answers1

1

You have likely only deleted the file from the latest commit but it still exists in the repository history.

Consider: Completely remove file from all Git repository commit history

Community
  • 1
  • 1
John Doe
  • 57
  • 4