智能体
simonwillison.net ·
@Simon Willison's Weblog
commit-rewriter 0.1:用于清理 commit message 的小工具
Simon Willison 发布 commit-rewriter 0.1,一个用于编辑仓库 commit message 的 Web 小工具,起因是 Datasette 安全发布中初始提交含编码 Agent 产生的冗余内容和私有仓库 issue 引用。可通过 uvx commit-rewriter path/to/repo 运行;提交修改后会创建带时间戳的分支以便回滚,并重写从首个被编辑提交到最新的所有提交。
AI推荐理由 Simon Willison 发布开源小工具 commit-rewriter 0.1,用于编辑仓库的 commit message,起因是 Datasette 安全发布中初始提交含编码 Agent 产生的冗余内容和私有仓库 issue 引用。工具通过 uvx 运行,提交修改后会创建带时间戳的分支以便回滚,再重写从首个被编辑提交到最新的所有提交。对使用编码 Agent 的开发者有实际用途,属一手发布信息。
68
正文
**Release:** [commit-rewriter 0.1](https://github.com/simonw/commit-rewriter/releases/tag/0.1)
I built this little web app the other day to help edit the commit messages for the [Datasette security releases](https://datasette.io/blog/2026/september-security-releases/). The initial commits were full of coding agent cruft and references to issue IDs from our private repository, so they weren't fit for publication.
If you want to edit the commit messages for a repository you can run it like this:
```
uvx commit-rewriter path/to/repo
```
Omit the path if you are already in the directory for that repo.

When you submit your edits the tool creates a timestamped branch of your current repo state - to allow you to revert if you need to - and then rewrites every commit from the first one you edited to the most recent.
Tags: [git](https://simonwillison.net/tags/git), [projects](https://simonwillison.net/tags/projects), [python](https://simonwillison.net/tags/python), [ai-assisted-programming](https://simonwillison.net/tags/ai-assisted-programming)