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 '''
原文地址:https://www.cnblogs.com/u-damowang1/p/12976576.html