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