LinuxCommandLibrary

git-reauthor

Rewrite commit authorship history

TLDR

Change author of commits

$ git reauthor --old-email [old@email.com] --correct-email [new@email.com]
copy
Change name and email
$ git reauthor --old-email [old@email.com] --correct-name "[New Name]" --correct-email [new@email.com]
copy
Reauthor specific range
$ git reauthor --old-email [old@email.com] --correct-email [new@email.com] [commit-range]
copy

SYNOPSIS

git reauthor [options] [range]

DESCRIPTION

git reauthor rewrites commit history to correct author information. It updates author names and email addresses throughout the specified commit range for all commits matching the old email.
The command is useful for fixing incorrect attribution, consolidating identities after email changes, or correcting authorship before publishing a repository. Since it rewrites history, it should only be used on branches that have not been shared.

PARAMETERS

--old-email EMAIL

Email to match.
--correct-email EMAIL
New email address.
--correct-name NAME
New author name.
RANGE
Commit range to process.
--help
Display help information.

CAVEATS

Part of git-extras package. Rewrites history. Don't use on shared branches. All commit hashes change.

HISTORY

git reauthor is part of git-extras, providing a convenient wrapper for the common task of fixing author information.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community