推送到github回购时出错 [英] Error while pushing to github repo

查看:151
本文介绍了推送到github回购时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我推送我的提交时收到以下错误

  remote:warning:File var / log / system.log is 57.82 MB;这大于推荐的最大文件大小50 MB 
remote:错误:GH001:检测到大文件。
remote:error:Trace:96d01231dffac3fbc3ba1eb2e9f01a93
remote:error:有关更多信息,请参阅http://git.io/iEPt8g。
remote:error:File var / report / 752246136671是100.86 MB;这超过了github的文件大小限制为100 MB

我尝试了以下逐步列出的命令:

  git push -u原点大师

在我输入git状态时,无法在git文件中找到这些提交。

请让我知道如何将我的更改推送到没有这些错误的回购站点?我猜这些文件在github索引中。我也试过git rm --cached var / log / system.log。但没有结果。



将我的头撞到了墙上!

更新1
请根据以下两位专家的回答,在此找到Gist: //gist.github.com/haijerome/9405598rel =nofollow> https://gist.github.com/haijerome/9405598

  • answer#2 - https://gist.github.com/haijerome/9405492



  • UPDATE 2
    请在下面的git中查找我试图删除的两个文件的日志详细信息:





    解答



    请找出要点最终答案,解决了我的问题




    学分给Git专家VonC,Holger Just和所有其他提供了他们的输入和关注的计算器的专家。



    解决方案 git rm --cached 不足以删除历史记录文件存储在您的仓库中。



    您需要:使用
    $ b


    • BFG Repo Cleaner ,如上所述。

        bfg --strip-blobs-greater-than 1M my-repo.git 


    • 使用 git gc --agrressive --prune = now (BFG之后),详见减小git存储库大小


    • git push -f 强制在您的远程回购中使用新的历史记录。 b $ b

    I receive the following error when pushing my commits

    remote: warning: File var/log/system.log is 57.82 MB; this is larger than recommended maximum file size of 50 MB
    remote: error: GH001: Large files detected.
    remote: error: Trace: 96d01231dffac3fbc3ba1eb2e9f01a93
    remote: error: See http://git.io/iEPt8g for more information.
    remote: error: File var/report/752246136671 is 100.86 MB; this exceeds github's file size limit of 100 MB
    

    I tried the following the commands listed step by step below:

    git push -u origin master
    

    cant find these in git files to commit when i typed git status.

    Could you please let me know how to push my changes to repo without these errors ? I guess these files are in github index . I also tried git rm --cached var/log/system.log. but no results.

    hitting my head to wall !

    UPDATE 1 Kindly find the Gists here based on the two answers from experts below:

    UPDATE 2 Kindly find below the git Log details for the both the files that i tried to remove:

    ANSWER THAT WORKED

    Please find the gist for the final answer that solved my issue

    credits to git experts VonC, Holger Just and all other experts who have provided their inputs and ofcourse to stackoverflow.

    解决方案

    git rm or git rm --cached isn't enough to remove that file fir the history stored in your repo.

    You need to:

    • use BFG Repo Cleaner, as suggested above.

      bfg --strip-blobs-bigger-than 1M  my-repo.git
      

    • use git gc --agrressive --prune=now (after BFG), as detailed in "Reduce git repository size"

    • git push -f to force the new history on your remote repo.

    这篇关于推送到github回购时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆