BFG是用Scala写的,像git-filter-branch那样删除大的或麻烦的块,但是速度更快。 在GitHub上查看项目 $ bfg --strip-blobs-bigger-than 100M --replace-text banned.txt repo.git git-filter-branch 的另一种选择 BFG是git-filter-branch之外的一种更简单、更快的方法,可以清除Git存储库历史中的不良数据: 删除 大文件 删除 密码、凭证 和其他 私人数据 git-filter-branch BFG 10 - 720x 比git-filter-branch更快,将过夜作业提升到不到10分钟的作业。
ignore-unmatch src/file-to-delete.txt' --prune-empty --tag-name-filter cat -- --all 控制台输出,已经完成删除 WARNING: git-filter-branch
你可能接触过 git-filter-branch 来清理 git 仓库,不过同时也能体会到这个命令使用的繁琐,以及其超长的执行时间。 现在,你可以考虑使用 bfg 来解决问题了! 那么本文后面的所有命令的最后面你都应该加上路径 可能需要解除保护 如果本文后面的命令你遇到了受保护的提交,那么需要在所有命令的后面加上 --no-blob-protection 参数 常见用法 使用 bfg 来清理仓库比 git 原生的 git-filter-branch
git rm -rf --cached --ignore-unmatch bigfile' --prune-empty --tag-name-filter cat -- --all WARNING: git-filter-branch
git rev-list --objects --all | grep "$hash") echo "$file $size" done BFG Repo-Cleaner 虽然可以使用git-filter-branch
git-request-pull 53 git-svn 54 git-fast-import 55 git-clean 56 git-gc 57 git-fsck 58 git-reflog 59 git-filter-branch
如果您计划最终从 SVN 迁移到 Git 并确定要删除 SVN 历史记录,请考虑 git-filter-branch [1] 。 GIT 部分 git [1] 套件 git-filter-branch 原文: git-scm.com/docs/git-filter-branch 名称 git-filter-branch - 如果 git-filter-branch 只有一个或零个非修剪父项,则该选项指示 git-filter-branch 删除这些提交;因此,合并提交将保持不变。 与 git-filter-branch 不同,BFG 不会根据历史记录中提交的位置或时间以不同方式处理文件。 git-filter-branch 按顺序清除提交(即以单线程方式),尽管可以在针对每个提交执行的脚本中编写包含其自身并行性的过滤器。
git-request-pull 53 git-svn 54 git-fast-import 55 git-clean 56 git-gc 57 git-fsck 58 git-reflog 59 git-filter-branch
git-request-pull 53 git-svn 54 git-fast-import 55 git-clean 56 git-gc 57 git-fsck 58 git-reflog 59 git-filter-branch
git-request-pull 53 git-svn 54 git-fast-import 55 git-clean 56 git-gc 57 git-fsck 58 git-reflog 59 git-filter-branch
git-whatchanged git-fetch git-fast-import gitweb git-format-patch git-filter-branch
git-whatchanged git-fetch git-fast-import gitweb git-format-patch git-filter-branch
git-config[1] 获取并设置存储库或全局选项 git-fast-export[1] Git 数据导出器 git-fast-import[1] 快速 Git 数据导入器的后端 git-filter-branch