git-filter-repo
13,512
Stars
1,023
Forks
73
Watchers
113
Open Issues
NOASSERTION
许可证
Python
语言
2018-08-21
创建时间
2026-07-09
最近更新
项目能做什么
用于快速重写 Git 仓库历史记录的高效工具,推荐作为 filter-branch 的替代品。
来源:基于仓库元数据
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
git filter-repo is a versatile tool for rewriting history, which includes
[capabilities I have not found anywhere
else](#design-rationale-behind-filter-repo). It roughly falls into the
same space of tool as [git
filter-branch](https://git-scm.com/docs/git-filter-branch) but without the
capitulation-inducing poor
[performance](https://public-inbox.org/git/CABPp-BGOz8nks0+Tdw5GyGqxeYR-3FF6FT5JcgVqZDYVRQ6qog@mail.gmail.com/),
with far more capabilities, and with a design that scales usability-wise
beyond trivial rewriting cases. [git filter-repo is now recommended by the
git project](https://git-scm.com/docs/git-filter-branch#_warning) instead
of git filter-branch.
While most users will probably just use filter-repo as a simple command
line tool (and likely only use a few of its flags), at its core filter-repo
contains a library for creating history rewriting tools. As such, users
with specialized needs can leverage it to quickly create [entirely new
history rewriting tools](contrib/filter-repo-demos).
# Table of Contents
* [Prerequisites](#prerequisites)
* [How do I install it?](#how-do-i-install-it)
* [How do I use it?](#how-do-i-use-it)
* [Why filter-repo instead of other alternatives?](#why-filter-repo-instead-of-other-alternatives)
* [filter-branch](#filter-branch)
* [BFG Repo Cleaner](#bfg-repo-cleaner)
* [Simple example, with comparisons](#simple-example-with-comparisons)
* [Solving this with filter-repo](#solving-this-with-filter-repo)
* [Solving this with BFG Repo Cleaner](#solving-this-with-bfg-repo-cleaner)
* [Solving this with filter-branch](#solving-this-with-filter-branch)
* [Solving this with fast-export/fast-import](#solving-this-with-fast-exportfast-import)
* [Design rationale behind filter-repo](#design-rationale-behind-filter-repo)
* [How do I contribute?](#how-do-i-contribute)
* [Is there a Code of Conduct?](#is-there-a-code-of-conduct)
* [Upstream Improvements](#upstream-improvements)
# Prerequisites
filter-repo requires:
* git >= 2.36.0
* python3 >= 3.6
# How do I install it?
While the `git-filter-repo` repository has many files, the main logic
is all contained in a single-file python script named
`git-filter-repo`, which was done to make installation for basic use
on many systems trivial: just place that one file into your $PATH.
See [INSTALL.md](INSTALL.md) for things beyond basic usage or special
cases. The more involved instructions are only needed if one of the
following apply:
* you do not find the above comment about trivial installation intuitively
obvious
* you are working with a python3 executable named something other than
"python3"
* you want to install documentation (beyond the builtin docs shown with -h)
* you want to run some of the [contrib](contrib/filter-repo-demos/) examples
* you want to create your own python filtering scripts using filter-repo as
a module/library
# How do I use it?
For comprehensive documentation:
* see t
阅读完整原文
项目深度分析 规则生成(AI 未配置)
综合评分 49.8 分。该项目在“个人可实施性”维度得 60 分,“付费可能性”维度得 20.0 分,差异化空间 70.0 分(评分依据见评分卡)。
面向细分需求的二次开发产品
| 产品构想 | 基于 git-filter-repo 的核心能力,聚焦一个更窄的场景(如某平台、某行业)做差异化。 |
| 目标用户 | 该细分场景用户 |
| 难度/周期 | 中 · 2~6 周 |
| 收费模式 | 买断制 / 订阅制 / 广告 |
| 竞争风险 | 细分需求规模需验证 |
| 依据 | AI 推测:基于项目主题标签的判断 |
封装为在线小工具或 API 服务
| 产品构想 | 把项目最常用的一个功能做成网页小工具,靠流量变现或按量计费。 |
| 目标用户 | 搜索引擎带来的长尾用户 |
| 难度/周期 | 低 · 1~3 周 |
| 收费模式 | 免费引流 + 增值功能 / API 按量计费 |
| 竞争风险 | 同质化竞争,需做好 SEO |
| 依据 | AI 推测:基于技术栈与部署特征的判断 |
以上为规则引擎基于仓库公开数据生成的参考结论,包含推测成分,不构成投资或创业承诺;配置 AI 后可获得更深入的分析。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
相似项目数据正在完善中,暂不展示(避免误导)
项目优势与风险
| 技术成熟度 | 创建于 2018-08-21,最近推送 2026-07-09,发布过 14 个 Release |
| 社区活跃 | Star 13,512 / Fork 1,023 / Issue 113(数据支持,可自行核实) |
| 许可证 | NOASSERTION |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。