我試圖在我的應用程序中提交一些更改,並收到開發日誌在512MB時太大的錯誤。我刪除了開發日誌文件並再次嘗試,同樣的錯誤出現了,日誌大小爲103.2MB。我也試過,發生同樣的錯誤。開發日誌文件超過GitHub的文件大小限制,甚至在刪除文件後
顯然開發日誌文件正在被重寫。我從來沒有使用日誌,並可能不會錯過他們...有沒有辦法承諾git,而不是重寫開發日誌?試圖從答案1建議後
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's file size limit of 100 MB
更新和低於2:
的問題依然存在。我已經從git倉庫中刪除了日誌文件,並且在本地機器上插入了.gitignore文件,並使用配置記錄器位更新了development.rb。下面的最後兩行顯示了在git或我的本地機器中不存在development.log文件。
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's 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
我早些時候曾承諾仍然有日誌/ development.log文件。使用下面的選擇答案提供(非常非常感謝這個人)這個代碼,這個問題是固定有一個小警告:
git filter-branch --index-filter 'git rm --cached --ignore-unmatch log/development.log' --tag-name-filter cat -- --all
需要說明的是,我不得不使用git push origin +master
覆蓋Git的自動拒絕非快進更新。我很喜歡這樣做,因爲我是唯一一個在這個應用上工作的人。看到這個問題:
+1,這是要做的事情擺脫你的回購中的文件,考慮檢查我的答案停止,以避免這個文件被填充 – apneadiving
非常感謝您的答覆。我嘗試了所有這些,但仍然得到相同的錯誤。任何其他想法? – tbone
@tbone檢查此鏈接http://stackoverflow.com/questions/17382375/github-file-size-limit-changed-6-18-13-cant-push-now/17415982#17415982 –