To set repository-specific username/email configuration:
- From the command line, change into the repository directory.
- Set your username: git config user.name "FIRST_NAME LAST_NAME"
- Set your email address: git config user.email ""
- Verify your configuration by displaying your configuration file:
How do I change a Git committer?
Use git push -f #to update your origin with the updated commits.
- # For one commit.
- git commit --amend --author="Author Name <>"
-
- # for multiple commits.
- git rebase -i B.
- #if you need to edit A, use.
- git rebase -i --root.
- #change the lines for both C and D from pick to edit.
How do I change the author name in Git?
Depending on the type of changes, you can perform the following if you need to change the:
- The author of the commit. Perform: git commit --amend --author="Author Name <>"
- The date of the commit. For current date and time. ...
- The commit message. Perform: git commit --amend -m "New Commit Message"