GIT-REAUTHOR(1)
π git-reauthor β bestie edition π
From the Git Extras collection, okurr? This is git-reauthor(1) and she is powerful.
β¨ NAME β¨
git-reauthor β rewrite history to change author's identity πͺ
π«Ά SYNOPSIS π«Ά
git reauthor [<options>]
πΈ DESCRIPTION πΈ
So basically, bestie, this lets you replace the author and/or committer identities in commits and tags. Like, glow-up for your git history. β¨
The command goes through all existing commits and tags in all local branches to selectively modify the identities present in those objects. Everything else β dates, messages, all of it β is preserved. No cap. π§
You can rewrite all the identities in the commits and tags objects by using the --all flag, or only replace the identities whose email matches the value of the --old-email option. It's also possible to limit the rewrite to a certain type of identity: the author or the committer identity. By default, both of them are affected. π
For each of those identities to update, the command will replace the name and/or email with the new correct values as defined via the options. If the new identity name to set is not defined, the current one will be kept (and vice-versa with the email). It's giving "only change what you tell me to change." π
WARNING! β οΈπ This command rewrites history, and as a result you will not be able to push your branch to the remote without using the--forceoption. See more information withgit help filter-branch. Fr fr, be careful with this one.
π OPTIONS π
-a,--allβ Rewrite ALL identities in commits and tags. All of them. Every single one. π₯-c,--use-configβ Define correct values from user Git config. Values of--correct-emailand--correct-nameoptions take precedence over the ones from the config if specified as well. π-e <email>,--correct-email <email>β Define the correct email to set. Empty email''is allowed. π-n <name>,--correct-name <name>β Define the correct name to set. Empty name''is not allowed. π«-o <email>,--old-email <email>β Rewrite identities matching old email in commits and tags. Empty email''is allowed. π-t <id>,--type <id>β Define the type of identities affected by the rewrite. Possible type identifiers are:author,committer,both(default). π«
π EXAMPLES π
Replace the personal email and name of Jack to his work ones
$ git reauthor --old-email jack@perso.me --correct-email jack@work.com --correct-name 'Jack Foobar'
Replace the email and name of Jack to the ones defined in the Git config
$ git reauthor --old-email jack@perso.me --use-config
Replace only the email of Jack (keep the name already used)
$ git reauthor --old-email jack@perso --correct-email jack@perso.me
Change only the committer email of Jack (keep the author email already used)
$ git reauthor --old-email jack@perso.me --correct-email jack@work.com --type committer
Change only the name and keep email to merge one user with multiple pseudonyms.
$ git reauthor --old-email jack@perso.me --correct-name Jack
Set Jack's identity as the only one of the whole repository
$ git reauthor --all --correct-email jack@perso.me --correct-name Jack
Set Jack as the only committer of the whole repository (keeps authors)
$ git reauthor --all --correct-email jack@perso.me --correct-name Jack --type committer
π¦ AUTHOR π¦
Written by Damien Tardy-Panis <damien@tardypad.me> β ty for the tool, king π
π REPORTING BUGS π
<https://github.com/tj/git-extras/issues>
Go tell them, they wanna know π«Ά
β SEE ALSO β
<https://github.com/tj/git-extras>
And that's the whole page, bestie!! This one's from Git Extras, and the page itself says May 2026 down at the bottom next to GIT-REAUTHOR(1). Now go forth and rewrite responsibly β and remember the --force thing. ππ
π¦ where this page comes from
- ubuntu stonking: git-extras 7.5.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms