跳至主要內容

git lfs下載時出現404 object not found問題

Last Updated on 2021-09-30 by william

解決方式

  1. 下載mirror git專案
    git clone –mirror <git url>
  2. 找出有問題的object OID
    cd git專案
    git lfs fetch –all
  3. 透過OID,找出有問題的LFS檔案, 並且把檔案名稱都記下來
    git log –all -p -S <OID>
  4. 下載BFG repo cleaner (java 程式)
    https://rtyley.github.io/bfg-repo-cleaner/
  5. 清理檔案
    java -jar bfg.jar –delete-files <file name> <git location : xxx.git>
  6. 重新整理
    cd xxx.git
    git reflog expire –expire=now –all && git gc –prune=now –aggressive
  7. 收工
    git push
分類:未分類

搶先發佈留言

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

由 Compete Themes 設計的 Author 佈景主題