Error while pushing to github repo

前端 未结 3 580
刺人心
刺人心 2020-12-18 11:01

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         


        
3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-18 11:20

    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.

提交回复
热议问题