# f/git-rewrite-commits

AI-powered git commit message rewriter using Ollama or GPT

Repository: https://github.com/f/git-rewrite-commits
Canonical: https://ross.abutalabs.com/products/git-rewrite-commits
Homepage: https://blog.fka.dev/git-rewrite-commits/
Language: TypeScript
License: MIT
License Family: permissive
Topics: git, pre-commit-hook
Last push: 2026-06-21T14:23:53+00:00

## Health v2 (maintenance only)
Score: 56/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 88, release rhythm 35, longevity 21
- inputs: {"age_days": 297, "days_push": 73, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1419, forks 59 (observed 2026-08-28T04:04:40.432493+00:00)

## What it is
A TypeScript CLI tool that uses AI (OpenAI GPT or local Ollama models) to rewrite git commit history with better, conventional commit messages. It supports git hooks integration, dry-run previews, automatic backups, and privacy features like secret redaction and fully local processing.

## Use cases
- clean up messy commit history before open-sourcing a repo
- rewrite git commit messages with AI
- generate conventional commit messages automatically
- fix commit messages locally using Ollama without sending code to the cloud
- install a git hook that auto-generates commit messages
- preview history rewrites with a dry run before applying

## When to choose
- you need to polish a personal project's history before making it public
- you want conventional-commit formatting across an entire branch's history
- you prefer local AI processing via Ollama for privacy-sensitive repos
- you want backups and dry-run safety when rewriting history

## When to avoid
- on shared branches or after others have pulled commits, since rewriting changes hashes and requires force-push
- on team main/master branches without coordination
- in repositories where commit hashes are referenced elsewhere
- you only want to stage or lint new commits rather than rewrite history

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, developer-tools, version-control, llm-inference, workflow-automation
- domain: developer-tools, version-control, large-language-models
- platform: cli, cross-platform
- tags: git, conventional-commits, ollama, openai, git-hooks, history-rewrite, commit-messages, npx, command-line, nodejs

## Member repositories
- f/git-rewrite-commits (main) score 56

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:40.432493+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:37:52.778028+00:00, confidence not recorded.
  - readme: https://github.com/f/git-rewrite-commits (fetched 2026-08-28T04:04:40.432493+00:00, sha 2cc4f1757a78)
  - homepage: https://blog.fka.dev/git-rewrite-commits/ (fetched 2026-08-29T11:50:31.321882+00:00, sha d1c1cfd6cb8d)
  - registry_npm: https://registry.npmjs.org/git-rewrite-commits (fetched 2026-08-29T11:50:31.331001+00:00, sha 47cad6913d13)
- Data as of 2026-08-30T08:39:29.467469+00:00.
