- Set correct user name and email in current repo/directory.
git config --local user.name "FirstName LastName"
git config --local user.email "name@domain.org"
git rebase --onto HEAD~6 --exec "git commit --amend --reset-author --no-edit" HEAD~6
- This will change the author metadata of your last 6 commits.
Stolen from https://stackoverflow.com/questions/3042437/how-to-change-the-commit-author-for-one-specific-commit