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
| Flag | Required | Description |
|---|---|---|
--name <name> | Required | New author and committer name. Interactive runs prompt when omitted. |
--email <email> | Required | New author and committer email. Interactive runs prompt when omitted. |
--yes | Optional | Skip confirmation prompts. |
--force | Optional | Pass --force to git-filter-repo for non-fresh clones. |
--repo <path> | Optional | Target exactly one repository instead of discovering recursively. |
--no-fetch | Optional | Use local remote-tracking refs without fetching origin first. |
--guided | Optional | Interactively configure command options before execution. |
Prerequisites
git-filter-repomust 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 --forcefor a lease-safe remote update, orgit-wrangler push --force-unsafeonly when a raw force push is intentional.
- The remote
originURL is preserved and restored automatically after the rewrite --forcepasses--forcetogit-filter-repo; it is not a remote force push--yesonly skips the rewrite confirmation. It does not supply--nameor--email