我的.git
项目中Java
目录的大小为99 MB。它阻止推送消息:
错误:RPC失败; HTTP 413 curl 22请求的URL返回错误: 413请求实体太大
我尝试了以下命令:
git gc --auto
git filter-branch -f --tree-filter "rm -rf *.tmp" --prune-empty -- --all
git gc --aggressive --prune=now
rm -f .git/objects/*/tmp_*
输出这些命令:
$ git gc --aggressive --prune=now
Counting objects: 175, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (154/154), done.
Writing objects: 100% (175/175), done.
Total 175 (delta 75), reused 100 (delta 0)
$ git filter-branch -f --tree-filter "rm -rf *.tmp" --prune-empty -- --all
Rewrite 0d68ca0f7db205c48ae546515258ea2ffa763cb4 (1/12) (1 seconds passed, remaiRewrite 8db8b2340cb003b0b85e40d4e521473b189c2065 (1/12) (1 seconds passed, remaiRewrite b4376182b8c240c24174aa4dbb2aa88676a55fe7 (3/12) (13 seconds passed, remaRewrite 545753bd314e7143b1bc8cb5ad1a9b18d3bfd5d3 (4/12) (19 seconds passed, remaRewrite 4df0cb335acbdd3e32e9e169f859928066c1e791 (5/12) (26 seconds passed, remaining 36 predicted)