Editing Local Git History in the Browser
A local utility offers a browser interface for modifying commit messages in bulk, providing an alternative to terminal-based rebasing.
The commit-rewriter utility provides a local web interface for modifying commit history. When developers use coding agents, the resulting repository often contains dozens of commits with repetitive or noisy messages. This tool connects to the local Git repository and renders the commit log in a browser session, where users can perform bulk text edits instead of interacting with terminal editors. To initiate the connection, the user runs the tool in the repository root, which launches a local server that parses the git log output into a batch-editable table.
The Mechanics of Rewriting
Git commit objects are immutable; you cannot change a message in place. Every change to a commit message generates a new object with a unique SHA hash. When you click save in the browser interface, the tool acts as a wrapper for Git’s internal rebase mechanism. It effectively runs a sequence of git commit --amend or a programmatic rebase to regenerate the commit objects with the new data.
Because changing a commit hash renders all its child commits invalid—since the child stores the parent’s hash—the tool must recreate the entire chain of commits that follow your edits. To mitigate the risk of data loss during this process, the utility automatically creates a timestamped backup branch of your repository state before applying any modifications. This ensures you have a recovery point if the rewrite results in an unexpected state.
| Feature | Git CLI (rebase -i) |
commit-rewriter |
|---|---|---|
| Interface | Terminal editor | Web browser UI |
| History Visualization | Sequential list | Batch table view |
| Editing Scope | Single commit | Multi-select / Bulk |
A Worked Example
Consider a project where an agent generated fifty commits while importing a library. Each message includes an absolute file path pointing to a local temporary directory that is irrelevant for the repository history. Using git rebase -i would require you to open the editor fifty times to manually strip those strings. With commit-rewriter, you open the history in your browser, select the range of fifty commits, and use the web interface to perform a find-and-replace operation on the message fields. Once you click save, the tool executes the underlying Git commands to rewrite the objects in the local history, replacing the old, noisy messages with your cleaned text in a single operation.
Implementation Constraints
This utility is intended for simple, linear, unpushed sequences. Because every edit creates a new hash, the tool essentially reconstructs the commit history from the point of the first edit onward. It is currently unknown how the tool handles conflicts that arise when multiple developers modify the same branch, or how it behaves if the repository contains submodules that expect fixed commit pointers. The reliance on creating a new chain of commits means that any deviation from a straightforward, linear commit path significantly increases the risk of head detachment. Until the tool includes explicit logic for handling complex graph structures, it remains a specialized utility for tidying local feature branches rather than a general-purpose replacement for the standard CLI toolchain.