You can easily change the author of the most recent commit in your git history by executing the following command in your terminal. This command allows you to amend the last commit while specifying a new author name and email. It’s as simple as running:
git commit --amend --author="New Author Name <newauthor@example.com>"
Replace “New Author Name” and “newauthor@example.com” with the appropriate name and email address you want to set as the new author. Once you run this command, the last commit will be updated with the new author information, reflecting the changes in your git history. Remember to push the changes to the remote repository if you have already shared the commit with others.