我试图在我的应用程序中提交一些更改,并收到开发日志在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 –