截至2013年6月18日,此更改如何影响我的现有存储库,其文件超出此限制?我上次用大文件推了2个月前.
我有一个大文件,我已在本地删除但我现在无法推送任何东西.我得到一个"远程错误"...远程:错误:文件cron_log.log是126.91 MB; 这超过了GitHub的文件大小限制为100 MB
我在原始推送后将文件添加到.gitignore ...但它仍然存在于远程(原点)
在本地删除它应该在原点(Github)摆脱它吗?......但是......它不会让我推,因为Github上的文件超出了限制...
https://github.com/blog/1533-new-file-size-limits
这些是我发出的命令加上错误信息..
git add . git commit -m "delete cron_log.log" git push origin master remote: Error code: 40bef1f6653fd2410fb2ab40242bc879 remote: warning: Error GH413: Large files detected. remote: warning: See http://git.io/iEPt8g for more information. remote: error: File cron_log.log is 141.41 MB; this exceeds GitHub's file size limit of 100 MB remote: error: File cron_log.log is 126.91 MB; this exceeds GitHub's file size limit of 100 MB To https://github.com/slinds(omited_here)/linexxxx(omited_here).git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://github.com/slinds(omited_here)
然后我尝试了类似的东西
git rm cron_log.log
git rm --cached cron_log.log
Run Code Online (Sandbox Code Playgroud)
同样的错误.
小智 26
嗨,你可以这样轻松解决:
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch FILENAME.TAR'
--prune-empty --tag-name-filter cat -- --all
链接:https://help.github.com/articles/remove-sensitive-data
Chr*_*ial 25
正如rlb.usa所说,Github添加了一个文件大小限制,阻止你推送文件> 100MB.您试图在新提交中删除该文件并尝试推送它.这失败了,因为你不只是推动最后一次提交,还有其他三个提交.这三个提交包含cron_log的版本,大小为141MB和126MB.它们会导致你的推动失败.
要解决这个问题,您有两种选择:
git rebase -i origin/master,设置每个提交以编辑并删除每个提交中的文件git commit --amend.| 归档时间: |
|
| 查看次数: |
39212 次 |
| 最近记录: |