-1

I've been trying to push my work to Github however have run into the below problem multiple times (I have tried manually deleting the Github repo and creating a new one, also doesn't work). I'm wondering why the problem seem to be file size, however when I look at the long list version of the contents, every file is small. Any ideas on how to fix/work around this?

Marshalls-MacBook-Pro:capstone marsh$ git push -u origin master
Counting objects: 49, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (42/42), done.
Writing objects: 100% (49/49), 342.87 MiB | 1.14 MiB/s, done.
Total 49 (delta 13), reused 0 (delta 0)
remote: Resolving deltas: 100% (13/13), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: fc447ecdd1e4c87fe9f6603e846d632b
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File week_2_milestone_report_cache/html/data tables_8d7ce74260766e58fc9bd03559cc885d.rdb is 343.68 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/marshallm94/capstone.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/marshallm94/capstone.git'
Marshalls-MacBook-Pro:capstone marsh$ ls -lh
total 1592
-rw-r--r--@ 1 marsh  staff   176B Nov 17 19:18 README.txt
-rw-r--r--@ 1 marsh  staff   2.5K Nov 17 19:39 eda.R
drwxr-xr-x  3 marsh  staff   102B Nov 18 07:49 rsconnect
-rw-r--r--@ 1 marsh  staff   1.8K Nov 17 21:53 setup.R
-rw-r--r--  1 marsh  staff   2.7K Nov 18 10:18 week_2_milestone_report.Rmd
-rw-r--r--  1 marsh  staff   779K Nov 18 10:18 week_2_milestone_report.html
m_squared
  • 105
  • 9
  • 1
    The file `week_2_milestone_report_cache/html/data tables_8d7ce74260766e58fc9bd03559cc885d.rdb` exceeds the file limit. You might want to remove it from the repo. – Kraylog Nov 18 '17 at 17:58
  • I think it's pretty clear from the error message.... they've even given you a URL to help! (hint: put your big files in https://git-lfs.github.com) – Alicia Sykes Nov 18 '17 at 18:00
  • Possible duplicate of [Failing to push to Github (this exceeds GitHub's file size limit)](https://stackoverflow.com/questions/45342654/failing-to-push-to-github-this-exceeds-githubs-file-size-limit) – Lasse V. Karlsen Nov 18 '17 at 18:01
  • Possible duplicate of [Git Large files detected](https://stackoverflow.com/questions/34025845/git-large-files-detected) – phd Nov 18 '17 at 19:18
  • I removed the cache still to no avail. I ended up just creating a new directory with a different name and transferring the files to that. A "duct-tape" fix but a fix nonetheless. – m_squared Nov 18 '17 at 20:33

2 Answers2

0

Github has a 100MB file size limit.

Try du in your project directory and see in any of the files in your subdirectories exceed that limit.

realharry
  • 1,555
  • 8
  • 12
0

The ls -h output you are getting does not prove that you don't have a file in the repo that exceeds GitHub's 100 MByte file size limit. You have one directory (rsconnect) in that repo. The file size ls shows for that directory (102B) is not the accumulative size of its child elements, it's merely the size of the space that the directory entry itself occupies in the file system.

As pointed out in realharry's answer, you can use du (possible with the -h flag to make the output more readable) to check the sizes of the elements in the directory recursively. You'll probably discover a file larger than 100 MByte that way.

anothernode
  • 5,100
  • 13
  • 43
  • 62