HeadlinesBriefing favicon HeadlinesBriefing.com

Git-knife: Edit commit messages/authors/dates like spreadsheet

Hacker News •
×

Show HN: git-knife – edit commit messages, authors, and dates like a spreadsheet. A clean desktop GUI for editing git commit metadata directly — message, author date, committer date, author name/email. Existing GUIs (Git Kraken, Sublime Merge, Fork, lazygit) reword and reorder well but treat commit dates as effectively immutable and don't expose committer date / author identity for arbitrary commits. The tools that can rewrite that metadata (git-filter-repo, git rebase env tricks, git commit-tree) have no GUI. git-knife fills that gap. It never reimplements git — it shells out to the system git CLI and rebuilds commits with git commit-tree, reusing each commit's original tree so file contents are provably never changed.

How it compares: The polished GUIs reword and reorder well but treat commit dates — especially the committer date — as effectively immutable, and none offer a bulk regex pass over author identity. git-knife is the intersection: a clean GUI that edits every field, in bulk, safely. MVP features: open a repo, list commits, edit message / author name+email / author date / committer date / committer name+email, bulk find & replace across text fields (literal or regex), preview every change before applying, automatic backup ref before each rewrite + one-click restore, warns when rewrite touches already-pushed history. Merge commits are locked (not editable in this version). Requirements: git (2.x), Node.js + pnpm, Rust (stable). Run with 'pnpm install; pnpm tauri dev'.

After rewriting shared history, anyone who pulled the old commits must re-sync: 'git fetch origin; git reset --hard origin/<branch>'. Undo a rewrite via the Backups panel or CLI. By default git-knife attaches a small disclosed note to each rewritten tip commit (on its own notes ref, invisible in normal git log) which can be toggled off. The rewrite strategy is validated at the git level with a script that reproduces the exact commit-tree flow and asserts content diff is empty. Safety: every apply creates a backup ref before touching anything.