harttle.github.io
harttle.github.io copied to clipboard
2016/03/22/purge-large-files-in-gitrepo
寻找并删除Git记录中的大文件 | Harttle Land
http://harttle.land/2016/03/22/purge-large-files-in-gitrepo.html
赞~
By 前端小武 2017-03-30T02:56:21Z
已用,如果可以做成脚本,就更方便了。
By yijialiu212 2017-06-30T07:14:26Z
可以删除整个目录,如: git filter-branch -f --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch third-party/openblas' --tag-name-filter cat -- --all
本地删除已经生效,执行 git push origin --force --all 强推到远端后,重新拉下来的仓库大小发现没有变化, 为什么呢?
git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -10 | awk '{print$1}')"
这里 多了 【)"】
本地删除已经生效,执行 git push origin --force --all 强推到远端后,重新拉下来的仓库大小发现没有变化, 为什么呢?
本地删除已经生效,执行 git push origin --force --all 强推到远端后,重新拉下来的仓库大小发现没有变化, 为什么呢?
git clone --no-hardlinks file:///Users/harttle/harttle.land /tmp/harttle.land 这一句是什么意思呢?
rm -rf .git/refs/original/ git reflog expire --expire=now --all git gc --prune=now git gc --aggressive --prune=now 这个可以生效
打印的结果中只有 文件id + 文件名, 更好的方式是同时打印 文件id + 文件名 + 文件大小 这3列