Basically all you need is to rebase to desired commit and use git ammend
command.
- Rebase to target commit:
git rebase -i [COMMIT-HASH]
for the first commit:
git rebase -i --root
- Pick commit by replace
pick
withedit
- Change the commit author:
git commit --amend --author="Name Lastname <example@example.com>"
- Apply changes by:
git rebase --continue
- Update the remote:
git push -f