finds.dev

f/git-rewrite-commits

AI-powered git commit message rewriter using Ollama or GPT

View on GitHubHomepage ↗

★ 1,422TypeScriptMITupdated Jun 2026

// the take

A CLI (and npm package, aliased as `grec`) that uses OpenAI or local Ollama models to rewrite git commit messages, either live via git hooks or retroactively across your whole history. Aimed at developers who want to clean up a messy commit log before open-sourcing a repo or merging a feature branch.

Takes the security side seriously for a tool that shells out to git and third-party APIs: it redacts secrets from diffs before sending them out, requires explicit consent for remote providers, and ships a local Ollama path so nothing has to leave the machine. Hooks are opt-in via git config rather than silently installed and active. It also creates a backup branch before any history rewrite, which is the right default for something this destructive.

It rewrites history with `git filter-branch`, which git's own docs tell you not to use anymore because of correctness and performance footguns — `git-filter-repo` has been the recommended tool for years and there's no sign this project uses or wraps it. The directory tree shows no test suite at all for a tool whose entire job is mutating commit history, which is the kind of thing you really want covered. The README's own quick-start example (`--skip-remote-consent` piped straight into `git commit -m`) bypasses the consent flow it advertises as a security feature, which is a mixed signal about how seriously to take the rest of the safety story. And the CI example runs the rewriter against PR commits, which is a strange fit since you can't force-push a PR's history on someone else's branch.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
1,422
Forks
58
Language
TypeScript
License
MIT
Last commit
21 Jun 2026

// nearby

If git-rewrite-commits isn't quite it.

All repos →