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