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 --force option. See more information with git 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-email and --correct-name options 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