git push 单个文件时超过100M报错,解决方案


  • 报错信息
    • remote: error: File: ad29d743061366b6a2b30b347c6907934ac7152e 101.85 MB, exceeds 100.00 MB.
      remote: Use command below to see the filename:
      remote: git rev-list --objects --all | grep ad29d743061366b6a2b30b347c6907934ac7152e
      remote: Please remove the file from history and try again. (https://gitee.com/help/articles/4232)
      To https://gitee.com/didi.git/xiaoshixun.git
       ! [remote rejected] master -> master (pre-receive hook declined)
      error: failed to push some refs to 'https://gitee.com/didi.git/xiaoshixun.git'

       

  • 解决方法
    • git lfs help  查看lfs帮助
      git lfs ls-files 查看当前有哪些文件是使用lfs管理的
      ''' 下载git lfs 链接https://git-lfs.github.com/ 1. git lfs install 2.git lfs track "*.iso" #iso为后缀名,根据自己的替换 3. git add .gitattributes 4. git add file.iso git commit -m "Add disk image" git push 5.如果有失败情况,清空一下缓存 git rm -r --cached '''

       


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM