git 单个文件超过100M的解决方法
·
git单个文件超过100M的解决方法
Password for 'https://knight-zhou@gitee.com':
Enumerating objects: 20, done.
Counting objects: 100% (20/20), done.
Delta compression using up to 12 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (14/14), 105.09 MiB | 5.84 MiB/s, done.
Total 14 (delta 7), reused 12 (delta 5)
remote: Powered by GITEE.COM [1.1.5]
remote: Set trace flag 7c401fba
remote: File [e56ffbae4805d09684122238afb5c8e978c6ba91] size 105.098MB, exceeds quota 100MB
remote: Please remove the file[s] from history and try again
To https://gitee.com/divide_about/divorce.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://knight-zhou@gitee.com/divide_about/xx.git'
解决
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch 'xx诉xxxx纠纷一案证据目录-02.docx'" --prune-empty --tag-name-filter cat -- --all
### 执行后的清理和推送
git reflog expire --expire=now --all
git gc --prune=now --aggressive
更多推荐




所有评论(0)