When starting to work on a new project, it is common to forget to set the author name and author email address for the specified project. Therefore, you will often have commits in your local branch that have been committed with the wrong username and/or email ID.
Changing the author of commits using a rebase
Getting ready
Before we begin this exercise, we need a branch, as always with Git. Name the branch resetAuthorRebase and make it track origin/master. Use the following command to achieve this:
$ git checkout -b resetAuthorRebase -t origin/master Branch resetAuthorRebase set up to track remote branch 'master' from 'origin'. Switched to a new branch 'resetAuthorRebase'