Change Author / Committer in Git
Frequently, I make a mistake of committing by other user.
How to solve
I should change wrong-committer@mizuki.io
to correct-committer@mizuki.io
.
I run
$ git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "wrong-committer@mizuki.io" ];
then
GIT_COMMITTER_NAME="Correct Committer";
GIT_COMMITTER_EMAIL="correct-committer@mizuki.io";
GIT_AUTHOR_NAME="Correct Committer";
GIT_AUTHOR_EMAIL="correct-committer@mizuki.io";
git commit-tree "$@";
else
git commit-tree "$@";
fi' HEAD
Memo
Above command changes ALL commits.
Read other posts