I tried to make some changes to my application and received an error message that the development log was too large at 512 MB. I deleted the development log file and tried again, and the same error appeared with a log size of 103.2MB. I also tried rake log:clear with the same error.
Apparently, the development log file is being overwritten. I never used logs and probably would not have missed them ... is there a way to fix git and not rewrite the development log?
2 files changed, 0 insertions(+), 1096498 deletions(-) rewrite log/development.log (100%) rewrite log/production.log (100%) [master]~/Projects/schoolsapi: git push origin master Username: Password: Counting objects: 26, done. Delta compression using up to 2 threads. Compressing objects: 100% (15/15), done. Writing objects: 100% (17/17), 6.90 MiB | 322 KiB/s, done. Total 17 (delta 7), reused 0 (delta 0) remote: Error code: 026c4e06d174bf5b0e51c754dc9459b0 remote: warning: Error GH413: Large files detected. remote: warning: See http://git.io/iEPt8g for more information. remote: error: File log/development.log is 103.32 MB; this exceeds GitHub file size limit of 100 MB
Update after trying the sentences from answers 1 and 2 below:
The problem still exists. I deleted the log file from the git repository and my local computer, inserted the .gitignore file and updated development.rb with the config logger bit. The last two lines below show that the development.log file does not exist on git or on my local machine.
master]~/Projects/schoolsapi: git add . [master]~/Projects/schoolsapi: git commit -m"Tried config logger per apnea diving" [master b83b259] Tried config logger per apnea diving 2 files changed, 4 insertions(+), 0 deletions(-) create mode 100644 .gitignore [master]~/Projects/schoolsapi: git push origin master Username: Password: Counting objects: 38, done. Delta compression using up to 2 threads. Compressing objects: 100% (23/23), done. Writing objects: 100% (26/26), 6.90 MiB | 525 KiB/s, done. Total 26 (delta 12), reused 0 (delta 0) remote: Error code: e69d138ee720f7bcb8112e0e7ec03470 remote: warning: Error GH413: Large files detected. remote: warning: See http://git.io/iEPt8g for more information. remote: error: File log/development.log is 103.32 MB; this exceeds GitHub file size limit of 100 MB [master]~/Projects/schoolsapi: rm log/development.log rm: log/development.log: No such file or directory [master]~/Projects/schoolsapi: git rm log/development.log fatal: pathspec 'log/development.log' did not match any files [master]~/Projects/schoolsapi:
UPDATE
I had earlier commits that still had a log / development.log file. Using this code provided by the selected answer below (many thanks to this person), the problem was fixed with one little caveat:
git filter-branch --index-filter 'git rm --cached --ignore-unmatch log/development.log' --tag-name-filter cat -- --all
The caveat is that I had to use git push origin +master to override git auto reject reject transient updates. It was convenient for me to do this, because I am the only person working on this application. See this question:
Git rejection without redirects