将已有git工程转为使用LFS

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