rewrite-authors

Rewrites author and committer names and emails across repositories.

Usage

git-wrangler rewrite-authors --name <new_name> --email <new_email> [--yes] [--force] [--repo <path>] [--no-fetch] [--guided]

The command prompts before any destructive history rewrite is performed. Use --yes to proceed noninteractively.

What it does

Discovers Git worktrees under the current directory, or targets exactly one worktree with --repo, and rewrites all author and committer names and emails across history using git-filter-repo. The remote origin URL is automatically restored after the rewrite.

By default, rewrite-authors first runs git fetch --prune origin for each target repository before showing the destructive notice or prompting. Any fetch failure stops the command before planning or mutation. Use --no-fetch for offline or local-only runs; the command warns that local remote-tracking refs may miss remote-only commits.

Options

FlagRequiredDescription
--name <name>RequiredNew author and committer name. Interactive runs prompt when omitted.
--email <email>RequiredNew author and committer email. Interactive runs prompt when omitted.
--yesOptionalSkip confirmation prompts.
--forceOptionalPass --force to git-filter-repo for non-fresh clones.
--repo <path>OptionalTarget exactly one repository instead of discovering recursively.
--no-fetchOptionalUse local remote-tracking refs without fetching origin first.
--guidedOptionalInteractively configure command options before execution.

Prerequisites

  • git-filter-repo must be installed

Example

git-wrangler rewrite-authors --name "Jane Doe" --email "jane@example.com" --yes --force

# Rewrite using local remote-tracking refs without refreshing origin
git-wrangler rewrite-authors --name "Jane Doe" --email "jane@example.com" --no-fetch

Notes

Warning: This rewrites Git history. Use git-wrangler push --force for a lease-safe remote update, or git-wrangler push --force-unsafe only when a raw force push is intentional.

  • The remote origin URL is preserved and restored automatically after the rewrite
  • --force passes --force to git-filter-repo; it is not a remote force push
  • --yes only skips the rewrite confirmation. It does not supply --name or --email