Created
May 1, 2022 22:53
-
-
Save rm3l/0ef83820ab8731fd67db97ab9118d752 to your computer and use it in GitHub Desktop.
git-filter-repo - changing author and committer email in multiple commits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install git-filter-repo, as suggested by git docs: https://git-scm.com/docs/git-filter-branch#_warning | |
git filter-repo --commit-callback ' | |
old_email = b"[email protected]" | |
correct_name = b"Your Correct Name" | |
correct_email = b"[email protected]" | |
if commit.committer_email == old_email : | |
commit.committer_name = correct_name | |
commit.committer_email = correct_email | |
if commit.author_email == old_email : | |
commit.author_name = correct_name | |
commit.author_email = correct_email | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment