工程文件太大,迁移到新的仓库一直报错,使用lfs完美解决。AI搜集资料完美,哈哈哈
//安装lfs
git lfs install
//添加跟踪
git lfs track "*.uasset" "*.umap" "*.mp4" "*.wav" "*.png" "*.tga" "*.pdb"
//
git add .gitattributes
//提交弃用lfs
git commit -m "Enable LFS for UE assets" || true
//迁移文件到lfs
git lfs migrate import --include="*.uasset,*.umap,*.mp4,*.wav" --everything
//清理旧对象
git reflog expire --expire=now --all
git gc --prune=now --aggressive
git lfs prune
//验证文件大小
git count-objects -vH
du -sh .git
//设置云端连接
git remote set-url origin https://xxx.git
//提交所有
git push --force --all
git push --force --tags