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

7次阅读

共计 227 个字符,预计需要花费 1 分钟才能阅读完成。

如何给 .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
正文完
 0