rewrite-coauthors

Add, replace, or remove coauthors in existing commit messages.

Usagegit-wrangler rewrite-coauthors <add|replace|remove> [options]

Warning: This rewrites Git history. Coordinate with collaborators and use git-wrangler push --force when publishing the result.

Add coauthors

git-wrangler rewrite-coauthors add \
  --coauthor "Jane Doe <jane@example.com>"

Repeat --coauthor to add more identities. A coauthor is added only when that email is not already present, ignoring letter casing. An existing display name is left unchanged.

Replace a coauthor

git-wrangler rewrite-coauthors replace \
  --email old@example.com \
  --coauthor "New Name <new@example.com>"

Only matching old emails are changed. If the new email is already present in the same commit, duplicate entries are combined and the supplied replacement identity is used.

Remove coauthors

# Remove selected emails
git-wrangler rewrite-coauthors remove \
  --email former@example.com \
  --email contractor@example.com

# Remove every coauthor entry
git-wrangler rewrite-coauthors remove --all

# Remove other trailers by key, such as session links
git-wrangler rewrite-coauthors remove --trailer Claude-Session

Use either repeatable --email values or --all, not both. --all also removes malformed coauthor entries that do not contain a valid name and email. Repeatable --trailer values remove every trailer with that key, ignoring letter casing, and can be combined with either coauthor selector.

What stays unchanged

Trailers not selected for removal, such as sign-offs and reviews, keep their original text and order. add skips merge commits, Git-generated reverts, and fixup/squash/amend commits. replace and remove change every matching commit, including merges.

Shared options

Option Default What it does
--repo <path> Whole workspace Rewrite exactly one repository.
--rewrite-after YYYY-MM-DD — Include commits on or after this current author date.
--rewrite-before YYYY-MM-DD — Include commits before this current author date.
--no-fetch Off Skip refreshing origin; remote information may be old.
--yes, -y Off Skip the rewrite confirmation.
--guided Off Choose options through prompts.

Every supplied identity must use Name <email>. Duplicate input emails are rejected even when their letter casing differs.

Before you run it

git-filter-repo is required. Git Wrangler previews affected messages and records changed commits so rollback-rewrites can restore them later.