I use Git on Windows and set the username and email with:
git config --global user.name "hydRAnger"
git config --global user.email "[email protected]"
When I use:
git config --global --list
I get the output:
user.name=hydRAnger
[email protected]
However, when I use git log
the author info should be:
Author: hydRAnger
<[email protected]>
But in fact I get the output:
Author: unknown
<hydRAnger@hydRAnger-PC.(none)>
I don't know why the author information incorect.
a) Running git config --global --list OR b) Opening ~/. gitconfig in an editor. To update your global user name (applies for future commits in ALL local repositories) run, git config --global user.name <username> .
GitHub uses the email address in the commit header to link the commit to a GitHub user. If your commits are being linked to another user, or not linked to a user at all, you may need to change your local Git configuration settings, add an email address to your account email settings, or do both.
Setting the user.name
and user.email
config options does not change already existing commits. It will only work for future commits.
If you also want to rewrite existing commits to use the new user data check out this question:
Change the author and committer name and e-mail of multiple commits in Git
Did you reset the author on your commit after updating your details?
git commit --amend --reset-author
(This will bring up the commit message again - you can just leave it intact)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With