How to amend several commits in Git to change author

I have made a series of commits in Git and I realise now that I forgot to set my user name and user email properties correctly (new machine). I have not yet pushed these commits to my repository, so how can I correct these commits before I do so (only the 3 latest commits on the master branch)?

I have been looking at git reset and git commit -C <id> --reset-author, but I don’t think I’m on the right track.

8 Answers
8

Leave a Comment