awesome-git-author-rewrite

Installation
SKILL.md

Git Author Rewrite

Replace the identity stamped on a commit — the author and committer name/email headers — with an identity the user actually owns, then force-push. The file tree, the commit messages, and the dates are preserved byte-for-byte; only the identity headers and, as a consequence, every affected commit hash change.

Why the ceremony: identity lives inside the commit object, so changing it changes the commit's hash, and every descendant commit's hash with it. That makes this an irreversible rewrite of a shared remote, not an edit. The steps below each close a specific way it goes wrong: rewriting a hash range far larger than the user pictured, pushing without write access, replacing one unowned email with another unowned email so the attribution still doesn't land, silently invalidating signatures, or force-pushing over a teammate's commit you never saw. A second clone that never got reset will push the old identity back the next day.

Core principle

NOTHING IRREVERSIBLE UNTIL FIVE THINGS HOLD: the new identity is proven to belong to the user's account, write access is confirmed, a mirror backup exists and is verified, the hash blast radius has been counted and shown, and the user has explicitly confirmed. If any one is missing, stop at that gate.

Four invariants hold throughout:

  • Never operate on the user's existing checkout. Work in a fresh clone in a scratch directory. If the rewrite is wrong, the scratch clone is disposable and the user's working copy was never touched.
  • Author and committer are two different fields. Rewriting only the author leaves the old address in the object and on the host's commit page ("X authored and Y committed"). Rewrite both unless the user asks for one.
  • One commit is never one commit. Rewriting commit C rewrites every commit that has C as an ancestor. Count them and show the number before asking for confirmation.
  • Never delete the backup, and never delete a remote ref, without asking. The backup is the only rollback path.

Invocation

Installs
38
GitHub Stars
22
First Seen
Aug 25, 2026