关于git:如何给-git-文件夹瘦身

如何给 .git 文件夹瘦身?

举荐工具:https://github.com/newren/git…

对工程进行剖析

git-filter-repo --analyze

删除指定文件或文件夹,如:

git-filter-repo --path-glob 'android/*.hprof' --invert-paths --force

更新所有分支

git push origin --force --all 

更新所有 tag(如果有)

git push origin --force --tags

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理