commit-rewriter 0.1 is a small web application created to help edit commit messages in a Git repository. The author built it to clean up the commit history used in the Datasette security releases, where initial commits contained automated agent artifacts and references to issue IDs from a private repository that were unsuitable for publication.
The tool lets you edit commit messages via a web interface and then apply those edits safely back to the repository history.
How to use
To run the tool on a repository, use the command:
uvx commit-rewriter path/to/repo
If you are already in the repository directory, you can omit the path.
What it does
When you submit edits, commit-rewriter creates a timestamped branch of the repository’s current state so you can revert if necessary. After that it rewrites every commit from the first one you edited up to the most recent commit.
This workflow removes unwanted automated text and private issue references from published commit messages while providing a safety net via the timestamped branch.
Notes and cautions
Rewriting commits changes repository history, so take care when using this on public or shared projects. Although commit-rewriter makes it easier to sanitize messages and provides a way to revert, it is sensible to keep backups or work on a separate branch when modifying history.
Context
The tool was developed specifically to address issues encountered in preparing Datasette security release commits for publication, but it can be applied to any repository where commit messages need cleaning of sensitive or internal references.



