Change the author of specific commits in a repository #121861
Unanswered
joaopa24
asked this question in
Repositories
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
I'm trying to reset the author of my old repositories, I managed to do it in some commits, but in others the format that contains noreply doesn't change
git filter-branch --env-filter '
OLD_EMAIL=""
OLD_NAME=""
CORRECT_NAME=""
CORRECT_EMAIL=""
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] && [ "$GIT_COMMITTER_NAME" = "$OLD_NAME" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] && [ "$GIT_AUTHOR_NAME" = "$OLD_NAME" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
I used this script, but in commits in this format below it does not change
Author: João Lucas 66539788+joaopa12@users.noreply.github.com
Date: Wed May 1 14:53:31 2024 -0300
Update README.md
Beta Was this translation helpful? Give feedback.
All reactions