赞
踩
首先,我们需要找出大文件。 找出排名前 3 的 pack 记录: git verify-pack -v .git/objects/pack/pack-*.idx | sort -k 3 -g | tail -3 找出大文件所在的位置 git rev-list --objects --all | grep bd97bfde4d9a108d012dd1e4685ef8ad6e1ec0ea 处理大文件 git filter-branch --index-filter 'git rm --cached --ignore-unmatch uploads/files/5d37a3de481b1.pdf' 执行以下语句 rm -rf .git/refs/original git reflog expire --expire=now --all git fsck --full --unreachable git repack -A -d git gc --aggressive --prune=now 需要提交就再执行 git push --force
更详细完整:
https://www.cnblogs.com/oloroso/p/13367120.html
git 文档说明:
https://www.atlassian.com/git/tutorials/using-branches
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。