Last active
May 16, 2023 10:01
-
-
Save iamawmrit/a1f62b79b9a19b79004e26212e2229a6 to your computer and use it in GitHub Desktop.
Rewrite git history
This file contains 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
git filter-branch --env-filter ' | |
if [ "$GIT_AUTHOR_EMAIL" = "email@email.com" ]; then | |
GIT_AUTHOR_NAME="username" | |
GIT_AUTHOR_EMAIL="email2@email2.com" | |
fi | |
if [ "$GIT_COMMITTER_EMAIL" = "email@email.com" ]; then | |
GIT_COMMITTER_NAME="username" | |
GIT_COMMITTER_EMAIL="email2@email2.com" | |
fi | |
' --tag-name-filter cat -- --branches --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To replace the author from commits.