git change email in commit code example
Example 1: Change Git commit user name and author
git commit --amend --author="Author Name <[email protected]>"
git rebase -i B
git rebase -i --root
git commit --amend --author="Author Name <[email protected]>"
git rebase --continue
git commit --amend --author="Author Name <[email protected]>"
git rebase --continue
git push -f
Example 2: git change email
git config --global user.email "[email protected]"
Example 3: git change commit id email
$ git config --global user.name "John Doe"
$ git config --global user.email "[email protected]"
Example 4: git change email of old commit
git change-commits GIT_AUTHOR_EMAIL "[email protected]" "[email protected]" HEAD~10..HEAD