concrete5/incremental-filter-branch

此包已被废弃,不再维护。作者建议使用concretecms/incremental-filter-branch包。

用于以增量方式调用git filter-branch的Shell脚本

1.0.2 2018-03-21 11:27 UTC

This package is auto-updated.

Last update: 2022-05-19 18:24:04 UTC


README

TravisCI Build Status

简介

git filter-branch是git的一个非常不错的特性。例如,它允许执行诸如子树分割等复杂的操作。

当仓库包含大量提交时,可能会出现一些问题:此操作可能需要花费很多时间。

幸运的是,git的最新版本允许我们以增量方式执行此操作:第一次调用filter-branch可能需要一些时间,但随后的调用可以非常快。

要求

  • git 2.16.0或更高版本
  • 常用命令(sedgrepmd5sumcut等)

用法

获取脚本并使用--help选项阅读语法。

示例

./bin/incremental-git-filterbranch \
    --branch-whitelist 'develop master rx:release\/.*' \
    --tag-blacklist 'rx:5\..*' \
    --tags-plan all --tags-max-history-lookup 10 \
    https://github.com/concrete5/concrete5.git \
    '--prune-empty --subdirectory-filter concrete' \
    git@github.com:concrete5/concrete5-core.git

法律事务

自行承担风险。使用MIT许可证

致谢

特别感谢Ian Campbell实现git的--state-branch选项,以及他关于如何使用它的提示。这个脚本之所以能工作,全靠他(如果它不起作用,那只能怪我自己)。